struct ssl_iostream_password_context ctx;
EVP_PKEY *pkey;
BIO *bio;
- char *key;
- key = t_strdup_noconst(set->key);
- bio = BIO_new_mem_buf(key, strlen(key));
+ bio = BIO_new_mem_buf(set->key, strlen(set->key));
if (bio == NULL) {
*error_r = t_strdup_printf("BIO_new_mem_buf() failed: %s",
openssl_iostream_error());
- safe_memset(key, 0, strlen(key));
return -1;
}
}
BIO_free(bio);
- safe_memset(key, 0, strlen(key));
*pkey_r = pkey;
*error_r = ctx.error;
return pkey == NULL ? -1 : 0;
EVP_PKEY **pkey_r, const char **error_r)
{
BIO *bio;
- char *dhvalue;
EVP_PKEY *pkey = NULL;
- dhvalue = t_strdup_noconst(set->dh);
- bio = BIO_new_mem_buf(dhvalue, strlen(dhvalue));
+ bio = BIO_new_mem_buf(set->dh, strlen(set->dh));
if (bio == NULL) {
*error_r = t_strdup_printf("BIO_new_mem_buf() failed: %s",
X509 *x;
int ret = 0;
- in = BIO_new_mem_buf(t_strdup_noconst(cert), strlen(cert));
+ in = BIO_new_mem_buf(cert, strlen(cert));
if (in == NULL)
i_fatal("BIO_new_mem_buf() failed");
BIO *bio;
int i;
- bio = BIO_new_mem_buf(t_strdup_noconst(ca), strlen(ca));
+ bio = BIO_new_mem_buf(ca, strlen(ca));
if (bio == NULL)
i_fatal("BIO_new_mem_buf() failed");
inf = PEM_X509_INFO_read_bio(bio, NULL, NULL, NULL);