summaryrefslogtreecommitdiff
path: root/src/crypto/fipsmodule/rsa/rsa_impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/fipsmodule/rsa/rsa_impl.c')
-rw-r--r--src/crypto/fipsmodule/rsa/rsa_impl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/fipsmodule/rsa/rsa_impl.c b/src/crypto/fipsmodule/rsa/rsa_impl.c
index 342f1c2c..c79f8649 100644
--- a/src/crypto/fipsmodule/rsa/rsa_impl.c
+++ b/src/crypto/fipsmodule/rsa/rsa_impl.c
@@ -533,6 +533,11 @@ err:
int rsa_default_private_transform(RSA *rsa, uint8_t *out, const uint8_t *in,
size_t len) {
+ if (rsa->n == NULL || rsa->d == NULL) {
+ OPENSSL_PUT_ERROR(RSA, RSA_R_VALUE_MISSING);
+ return 0;
+ }
+
BIGNUM *f, *result;
BN_CTX *ctx = NULL;
unsigned blinding_index = 0;