diff options
author | 2018-09-12 06:35:38 +0000 | |
---|---|---|
committer | 2018-09-12 06:35:38 +0000 | |
commit | bd0284078e042cfc456fe63adb56f581f0b9b844 (patch) | |
tree | 31e580c55b15dcc2bca44aaa9e526d1e1a93d406 /lib/libcrypto/rsa/rsa_meth.c | |
parent | fix edit mistake; spotted by jmc@ (diff) | |
download | wireguard-openbsd-bd0284078e042cfc456fe63adb56f581f0b9b844.tar.xz wireguard-openbsd-bd0284078e042cfc456fe63adb56f581f0b9b844.zip |
Add some accessor functions:
RSA_meth_get_finish() RSA_meth_set1_name() EVP_CIPHER_CTX_(get|set)_iv()
feedback and ok jsing@ tb@
Diffstat (limited to 'lib/libcrypto/rsa/rsa_meth.c')
-rw-r--r-- | lib/libcrypto/rsa/rsa_meth.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/libcrypto/rsa/rsa_meth.c b/lib/libcrypto/rsa/rsa_meth.c index 0e52799a384..ae613cc65c5 100644 --- a/lib/libcrypto/rsa/rsa_meth.c +++ b/lib/libcrypto/rsa/rsa_meth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_meth.c,v 1.1 2018/03/17 15:12:56 tb Exp $ */ +/* $OpenBSD: rsa_meth.c,v 1.2 2018/09/12 06:35:38 djm Exp $ */ /* * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> * @@ -63,6 +63,24 @@ RSA_meth_dup(const RSA_METHOD *meth) } int +RSA_meth_set1_name(RSA_METHOD *meth, const char *name) +{ + char *copy; + + if ((copy = strdup(name)) == NULL) + return 0; + free((char *)meth->name); + meth->name = copy; + return 1; +} + +int +(*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) +{ + return meth->finish; +} + +int RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) { |