diff options
Diffstat (limited to 'src/crypto/evp/p_rsa.c')
-rw-r--r-- | src/crypto/evp/p_rsa.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/crypto/evp/p_rsa.c b/src/crypto/evp/p_rsa.c index 15eb1ef..3bdd85d 100644 --- a/src/crypto/evp/p_rsa.c +++ b/src/crypto/evp/p_rsa.c @@ -97,12 +97,10 @@ typedef struct { } RSA_OAEP_LABEL_PARAMS; static int pkey_rsa_init(EVP_PKEY_CTX *ctx) { - RSA_PKEY_CTX *rctx; - rctx = OPENSSL_malloc(sizeof(RSA_PKEY_CTX)); + RSA_PKEY_CTX *rctx = OPENSSL_zalloc(sizeof(RSA_PKEY_CTX)); if (!rctx) { return 0; } - OPENSSL_memset(rctx, 0, sizeof(RSA_PKEY_CTX)); rctx->nbits = 2048; rctx->pad_mode = RSA_PKCS1_PADDING; |