diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_meth.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_meth.c | 20 | 
1 files changed, 19 insertions, 1 deletions
| diff --git a/src/lib/libcrypto/rsa/rsa_meth.c b/src/lib/libcrypto/rsa/rsa_meth.c index 0e52799a38..ae613cc65c 100644 --- a/src/lib/libcrypto/rsa/rsa_meth.c +++ b/src/lib/libcrypto/rsa/rsa_meth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_meth.c,v 1.1 2018/03/17 15:12:56 tb Exp $ */ | 1 | /* $OpenBSD: rsa_meth.c,v 1.2 2018/09/12 06:35:38 djm Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 
| 4 | * | 4 | * | 
| @@ -63,6 +63,24 @@ RSA_meth_dup(const RSA_METHOD *meth) | |||
| 63 | } | 63 | } | 
| 64 | 64 | ||
| 65 | int | 65 | int | 
| 66 | RSA_meth_set1_name(RSA_METHOD *meth, const char *name) | ||
| 67 | { | ||
| 68 | char *copy; | ||
| 69 | |||
| 70 | if ((copy = strdup(name)) == NULL) | ||
| 71 | return 0; | ||
| 72 | free((char *)meth->name); | ||
| 73 | meth->name = copy; | ||
| 74 | return 1; | ||
| 75 | } | ||
| 76 | |||
| 77 | int | ||
| 78 | (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) | ||
| 79 | { | ||
| 80 | return meth->finish; | ||
| 81 | } | ||
| 82 | |||
| 83 | int | ||
| 66 | RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | 84 | RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | 
| 67 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) | 85 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) | 
| 68 | { | 86 | { | 
