diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_lib.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 84e1dc7eaf..bf6865d260 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_lib.c,v 1.37 2018/04/14 07:09:21 tb Exp $ */ | 1 | /* $OpenBSD: rsa_lib.c,v 1.38 2019/10/24 15:47:15 jsing 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 | * |
| @@ -63,9 +63,12 @@ | |||
| 63 | #include <openssl/bn.h> | 63 | #include <openssl/bn.h> |
| 64 | #include <openssl/crypto.h> | 64 | #include <openssl/crypto.h> |
| 65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
| 66 | #include <openssl/evp.h> | ||
| 66 | #include <openssl/lhash.h> | 67 | #include <openssl/lhash.h> |
| 67 | #include <openssl/rsa.h> | 68 | #include <openssl/rsa.h> |
| 68 | 69 | ||
| 70 | #include "evp_locl.h" | ||
| 71 | |||
| 69 | #ifndef OPENSSL_NO_ENGINE | 72 | #ifndef OPENSSL_NO_ENGINE |
| 70 | #include <openssl/engine.h> | 73 | #include <openssl/engine.h> |
| 71 | #endif | 74 | #endif |
| @@ -365,3 +368,15 @@ RSA_set_flags(RSA *r, int flags) | |||
| 365 | { | 368 | { |
| 366 | r->flags |= flags; | 369 | r->flags |= flags; |
| 367 | } | 370 | } |
| 371 | |||
| 372 | int | ||
| 373 | RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2) | ||
| 374 | { | ||
| 375 | /* Return an error if the key type is not RSA or RSA-PSS. */ | ||
| 376 | if (ctx != NULL && ctx->pmeth != NULL && | ||
| 377 | ctx->pmeth->pkey_id != EVP_PKEY_RSA && | ||
| 378 | ctx->pmeth->pkey_id != EVP_PKEY_RSA_PSS) | ||
| 379 | return -1; | ||
| 380 | |||
| 381 | return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2); | ||
| 382 | } | ||
