#if OPENSSL_VERSION_NUMBER >= 0x00904000L
#define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL, NULL)
#if OPENSSL_VERSION_NUMBER >= 0x00904000L
#define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL, NULL)
ssldata = (sslsockdata *) safe_calloc (1, sizeof (sslsockdata));
/* the ssl_use_xxx protocol options don't apply. We must use TLS in TLS. */
if (!(ssldata->ctx = SSL_CTX_new (TLSv1_client_method ()))) {
ssldata = (sslsockdata *) safe_calloc (1, sizeof (sslsockdata));
/* the ssl_use_xxx protocol options don't apply. We must use TLS in TLS. */
if (!(ssldata->ctx = SSL_CTX_new (TLSv1_client_method ()))) {
goto bail_ssldata;
}
ssl_get_client_cert (ssldata, conn);
if (!(ssldata->ssl = SSL_new (ssldata->ctx))) {
goto bail_ssldata;
}
ssl_get_client_cert (ssldata, conn);
if (!(ssldata->ssl = SSL_new (ssldata->ctx))) {
err = X509_STORE_CTX_get_error (&xsc);
snprintf (buf, sizeof (buf), "%s (%d)",
X509_verify_cert_error_string (err), err);
err = X509_STORE_CTX_get_error (&xsc);
snprintf (buf, sizeof (buf), "%s (%d)",
X509_verify_cert_error_string (err), err);
- dprint (2, (debugfile, "X509_verify_cert: %s\n", buf));
+ debug_print (2, ("X509_verify_cert: %s\n", buf));
mutt_error (_("Server certificate is not yet valid"));
mutt_sleep (2);
return 0;
}
if (X509_cmp_current_time (X509_get_notAfter (peercert)) <= 0) {
mutt_error (_("Server certificate is not yet valid"));
mutt_sleep (2);
return 0;
}
if (X509_cmp_current_time (X509_get_notAfter (peercert)) <= 0) {
return 1;
}
/* automatic check from user's database */
if (SslCertFile && check_certificate_by_digest (data->cert)) {
return 1;
}
/* automatic check from user's database */
if (SslCertFile && check_certificate_by_digest (data->cert)) {
- dprint (2, (debugfile, "Using client certificate %s\n", SslClientCert));
+ debug_print (2, ("Using client certificate %s\n", SslClientCert));
SSL_CTX_set_default_passwd_cb_userdata (ssldata->ctx, &conn->account);
SSL_CTX_set_default_passwd_cb (ssldata->ctx, ssl_passwd_cb);
SSL_CTX_use_certificate_file (ssldata->ctx, SslClientCert,
SSL_CTX_set_default_passwd_cb_userdata (ssldata->ctx, &conn->account);
SSL_CTX_set_default_passwd_cb (ssldata->ctx, ssl_passwd_cb);
SSL_CTX_use_certificate_file (ssldata->ctx, SslClientCert,
- dprint (2, (debugfile, "ssl_passwd_cb: getting password for %s@%s:%u\n",
+ debug_print (2, ("getting password for %s@%s:%u\n",
account->user, account->host, account->port));
if (mutt_account_getpass (account))
account->user, account->host, account->port));
if (mutt_account_getpass (account))