summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-10-05 13:02:31 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-10-05 13:02:31 +0000
commit71a2440ee59567edea2cf14c000f3ca9e933953c (patch)
tree0667bcc2d242159161de93012241adc4e2a5ed2d /ssl/t1_lib.c
parent04e40739f75de96e601c694b723a4503b3895645 (diff)
backport OCSP fix enhancement
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index c4cd9cd5f0..00b8286acb 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -786,6 +786,18 @@ int ssl_check_clienthello_tlsext_late(SSL *s)
if (s->tlsext_status_type != -1 && s->ctx && s->ctx->tlsext_status_cb)
{
int r;
+ CERT_PKEY *certpkey;
+ certpkey = ssl_get_server_send_pkey(s);
+ /* If no certificate can't return certificate status */
+ if (certpkey == NULL)
+ {
+ s->tlsext_status_expected = 0;
+ return 1;
+ }
+ /* Set current certificate to one we will use so
+ * SSL_get_certificate et al can pick it up.
+ */
+ s->cert->key = certpkey;
r = s->ctx->tlsext_status_cb(s, s->ctx->tlsext_status_arg);
switch (r)
{