diff options
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r-- | src/lib/libtls/tls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index 00564edb3c..cccdb00531 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.c,v 1.49 2016/09/04 12:26:43 bcook Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.50 2016/11/02 15:18:42 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -419,6 +419,9 @@ tls_reset(struct tls *ctx) | |||
419 | tls_conninfo_free(ctx->conninfo); | 419 | tls_conninfo_free(ctx->conninfo); |
420 | ctx->conninfo = NULL; | 420 | ctx->conninfo = NULL; |
421 | 421 | ||
422 | tls_ocsp_ctx_free(ctx->ocsp_ctx); | ||
423 | ctx->ocsp_ctx = NULL; | ||
424 | |||
422 | for (sni = ctx->sni_ctx; sni != NULL; sni = nsni) { | 425 | for (sni = ctx->sni_ctx; sni != NULL; sni = nsni) { |
423 | nsni = sni->next; | 426 | nsni = sni->next; |
424 | tls_sni_ctx_free(sni); | 427 | tls_sni_ctx_free(sni); |
@@ -499,6 +502,8 @@ tls_handshake(struct tls *ctx) | |||
499 | ctx->ssl_peer_cert = SSL_get_peer_certificate(ctx->ssl_conn); | 502 | ctx->ssl_peer_cert = SSL_get_peer_certificate(ctx->ssl_conn); |
500 | if (tls_conninfo_populate(ctx) == -1) | 503 | if (tls_conninfo_populate(ctx) == -1) |
501 | rv = -1; | 504 | rv = -1; |
505 | if (ctx->ocsp_ctx == NULL) | ||
506 | ctx->ocsp_ctx = tls_ocsp_setup_from_peer(ctx); | ||
502 | } | 507 | } |
503 | out: | 508 | out: |
504 | /* Prevent callers from performing incorrect error handling */ | 509 | /* Prevent callers from performing incorrect error handling */ |