diff options
| author | gilles <> | 2019-06-05 15:41:33 +0000 |
|---|---|---|
| committer | gilles <> | 2019-06-05 15:41:33 +0000 |
| commit | 9726b0d68faa6893b67a94e7e23aaba30e342d10 (patch) | |
| tree | 946aa9d27a34e95cfd0b0f350d38ac577626558d /src/lib/libcrypto/rsa/rsa.h | |
| parent | d8475da0eb87c753ec094f513e9e547b496b4f9c (diff) | |
| download | openbsd-9726b0d68faa6893b67a94e7e23aaba30e342d10.tar.gz openbsd-9726b0d68faa6893b67a94e7e23aaba30e342d10.tar.bz2 openbsd-9726b0d68faa6893b67a94e7e23aaba30e342d10.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.h | 49 |
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)); |
| 441 | int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa); | 441 | int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa); |
| 442 | int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); | 442 | int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)); |
| 443 | int 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)); | ||
| 445 | int 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)); | ||
| 447 | int RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0, | ||
| 448 | const BIGNUM *i, RSA *rsa, BN_CTX *ctx)); | ||
| 449 | int 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)); | ||
| 452 | int RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa)); | ||
| 453 | int RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits, | ||
| 454 | BIGNUM *e, BN_GENCB *cb)); | ||
| 455 | int RSA_meth_set_flags(RSA_METHOD *meth, int flags); | ||
| 456 | int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data); | ||
| 457 | const char *RSA_meth_get0_name(const RSA_METHOD *); | ||
| 458 | int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, | ||
| 459 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding); | ||
| 460 | int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen, | ||
| 461 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding); | ||
| 462 | int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, | ||
| 463 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding); | ||
| 464 | int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, | ||
| 465 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding); | ||
| 466 | int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i, | ||
| 467 | RSA *rsa, BN_CTX *ctx); | ||
| 468 | int (*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); | ||
| 471 | int (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa); | ||
| 472 | int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e, | ||
| 473 | BN_GENCB *cb); | ||
| 474 | int RSA_meth_get_flags(const RSA_METHOD *meth); | ||
| 475 | void *RSA_meth_get0_app_data(const RSA_METHOD *meth); | ||
| 476 | int (*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); | ||
| 480 | int 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)); | ||
| 483 | int (*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); | ||
| 486 | int 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 |
