summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa.h
diff options
context:
space:
mode:
authorgilles <>2019-06-05 15:41:33 +0000
committergilles <>2019-06-05 15:41:33 +0000
commit47eafa9f3ab473cf14319312cf30f3c8400f0b78 (patch)
tree946aa9d27a34e95cfd0b0f350d38ac577626558d /src/lib/libcrypto/rsa/rsa.h
parenta7450720d741cb1de9f85ff969a0cc0510ce0202 (diff)
downloadopenbsd-47eafa9f3ab473cf14319312cf30f3c8400f0b78.tar.gz
openbsd-47eafa9f3ab473cf14319312cf30f3c8400f0b78.tar.bz2
openbsd-47eafa9f3ab473cf14319312cf30f3c8400f0b78.zip
provide getters and setters for the RSA_METHOD interface
ok tb@, jsing@, sthen@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa.h')
-rw-r--r--src/lib/libcrypto/rsa/rsa.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index d2df1a92d3..2aa472f501 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.39 2018/09/12 06:35:38 djm Exp $ */ 1/* $OpenBSD: rsa.h,v 1.40 2019/06/05 15:41:33 gilles Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -440,6 +440,53 @@ int RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
440 const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); 440 const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
441int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa); 441int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa);
442int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); 442int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
443int RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen,
444 const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
445int RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen,
446 const unsigned char *from, unsigned char *to, RSA *rsa, int padding));
447int RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0,
448 const BIGNUM *i, RSA *rsa, BN_CTX *ctx));
449int RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r,
450 const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
451 BN_MONT_CTX *m_ctx));
452int RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa));
453int RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits,
454 BIGNUM *e, BN_GENCB *cb));
455int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
456int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data);
457const char *RSA_meth_get0_name(const RSA_METHOD *);
458int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen,
459 const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
460int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen,
461 const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
462int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen,
463 const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
464int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen,
465 const unsigned char *from, unsigned char *to, RSA *rsa, int padding);
466int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i,
467 RSA *rsa, BN_CTX *ctx);
468int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r,
469 const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
470 BN_MONT_CTX *m_ctx);
471int (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa);
472int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
473 BN_GENCB *cb);
474int RSA_meth_get_flags(const RSA_METHOD *meth);
475void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
476int (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type,
477 const unsigned char *m, unsigned int m_length,
478 unsigned char *sigret, unsigned int *siglen,
479 const RSA *rsa);
480int RSA_meth_set_sign(RSA_METHOD *rsa, int (*sign)(int type,
481 const unsigned char *m, unsigned int m_length, unsigned char *sigret,
482 unsigned int *siglen, const RSA *rsa));
483int (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype,
484 const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
485 unsigned int siglen, const RSA *rsa);
486int RSA_meth_set_verify(RSA_METHOD *rsa, int (*verify)(int dtype,
487 const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf,
488 unsigned int siglen, const RSA *rsa));
489
443 490
444/* BEGIN ERROR CODES */ 491/* BEGIN ERROR CODES */
445/* The following lines are auto generated by the script mkerr.pl. Any changes 492/* The following lines are auto generated by the script mkerr.pl. Any changes