From 47bd2696f108ed72a37c309a2c1d049aeee2c89d Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 17 Mar 2018 15:12:56 +0000 Subject: Provide RSA_meth_{dup,free,new,set_{finish,priv_{dec,enc}}}() Note that these functions return NULL in out-of-memory situations, but contrary to OpenSSL's versions they do not set an error. ok jsing --- src/lib/libcrypto/rsa/rsa.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/rsa/rsa.h') diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index 65a643f4c6..23929aafb9 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.h,v 1.37 2018/02/20 17:42:32 tb Exp $ */ +/* $OpenBSD: rsa.h,v 1.38 2018/03/17 15:12:56 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -430,6 +430,15 @@ RSA *RSAPrivateKey_dup(RSA *rsa); */ #define RSA_FLAG_CHECKED 0x0800 +RSA_METHOD *RSA_meth_new(const char *name, int flags); +void RSA_meth_free(RSA_METHOD *meth); +RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); +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)); +int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, + const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); +int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. -- cgit v1.2.3-55-g6feb