Explorar el Código

Set verify_result, even on failure.

If code tries to inspect the verify result in the case of a failure then
it seems reasonable that the error code should be in there.

Change-Id: Ic32ac9d340c2c10a405a7b6580f22a06427f041d
Reviewed-on: https://boringssl-review.googlesource.com/10641
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
Adam Langley hace 8 años
padre
commit
a6cd185a54
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. +2
    -1
      ssl/ssl_cert.c

+ 2
- 1
ssl/ssl_cert.c Ver fichero

@@ -335,6 +335,8 @@ int ssl_verify_cert_chain(SSL *ssl, long *out_verify_result,
verify_ret = X509_verify_cert(&ctx);
}

*out_verify_result = ctx.error;

/* If |SSL_VERIFY_NONE|, the error is non-fatal, but we keep the result. */
if (verify_ret <= 0 && ssl->verify_mode != SSL_VERIFY_NONE) {
ssl3_send_alert(ssl, SSL3_AL_FATAL, ssl_verify_alarm_type(ctx.error));
@@ -343,7 +345,6 @@ int ssl_verify_cert_chain(SSL *ssl, long *out_verify_result,
}

ERR_clear_error();
*out_verify_result = ctx.error;
ret = 1;

err:


Cargando…
Cancelar
Guardar