STMT_START { HMAC_CTX_free(ctx); (ctx) = NULL; } STMT_END
#endif
+/* Not always present */
+#ifndef HAVE_BN_SECURE_NEW
+# define BN_secure_new BN_new
+#endif
+
/* openssl manual says this is OK */
#define OID_TEXT_MAX_LEN 80
/* decode and optionally decipher private key value */
if (enctype == DCRYPT_DOVECOT_KEY_ENCRYPT_NONE) {
- point = BN_new();
+ point = BN_secure_new();
if (point == NULL || BN_hex2bn(&point, input[3]) < 1) {
BN_free(point);
return dcrypt_openssl_error(error_r);
(*key_r)->ref++;
} else {
int ec;
- BIGNUM *point = BN_new();
+ BIGNUM *point = BN_secure_new();
if (point == NULL ||
BN_mpi2bn(key_data->data, key_data->used, point) == NULL) {
safe_memset(buffer_get_modifiable_data(key_data, NULL),