diff options
Diffstat (limited to 'src/lib/libtls/tls_ocsp.c')
| -rw-r--r-- | src/lib/libtls/tls_ocsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/libtls/tls_ocsp.c b/src/lib/libtls/tls_ocsp.c index 113ab0dd3d..0a3d50759f 100644 --- a/src/lib/libtls/tls_ocsp.c +++ b/src/lib/libtls/tls_ocsp.c | |||
| @@ -386,6 +386,9 @@ tls_ocsp_process_response(struct tls *ctx, const unsigned char *response, | |||
| 386 | int ret; | 386 | int ret; |
| 387 | OCSP_RESPONSE *resp; | 387 | OCSP_RESPONSE *resp; |
| 388 | 388 | ||
| 389 | if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0) | ||
| 390 | return -1; | ||
| 391 | |||
| 389 | resp = d2i_OCSP_RESPONSE(NULL, &response, size); | 392 | resp = d2i_OCSP_RESPONSE(NULL, &response, size); |
| 390 | if (resp == NULL) { | 393 | if (resp == NULL) { |
| 391 | tls_ocsp_ctx_free(ctx->ocsp_ctx); | 394 | tls_ocsp_ctx_free(ctx->ocsp_ctx); |
