diff options
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
| -rw-r--r-- | src/lib/libssl/t1_enc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index 6dcb2c849f..922d44ad4e 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
| @@ -819,8 +819,8 @@ tls1_enc(SSL *s, int send) | |||
| 819 | int | 819 | int |
| 820 | tls1_cert_verify_mac(SSL *s, int md_nid, unsigned char *out) | 820 | tls1_cert_verify_mac(SSL *s, int md_nid, unsigned char *out) |
| 821 | { | 821 | { |
| 822 | unsigned int ret; | ||
| 823 | EVP_MD_CTX ctx, *d = NULL; | 822 | EVP_MD_CTX ctx, *d = NULL; |
| 823 | unsigned int ret; | ||
| 824 | int i; | 824 | int i; |
| 825 | 825 | ||
| 826 | if (s->s3->handshake_buffer) | 826 | if (s->s3->handshake_buffer) |
| @@ -834,15 +834,17 @@ tls1_cert_verify_mac(SSL *s, int md_nid, unsigned char *out) | |||
| 834 | break; | 834 | break; |
| 835 | } | 835 | } |
| 836 | } | 836 | } |
| 837 | if (!d) { | 837 | if (d == NULL) { |
| 838 | SSLerr(SSL_F_TLS1_CERT_VERIFY_MAC, SSL_R_NO_REQUIRED_DIGEST); | 838 | SSLerr(SSL_F_TLS1_CERT_VERIFY_MAC, SSL_R_NO_REQUIRED_DIGEST); |
| 839 | return 0; | 839 | return 0; |
| 840 | } | 840 | } |
| 841 | 841 | ||
| 842 | EVP_MD_CTX_init(&ctx); | 842 | EVP_MD_CTX_init(&ctx); |
| 843 | EVP_MD_CTX_copy_ex(&ctx, d); | 843 | if (!EVP_MD_CTX_copy_ex(&ctx, d)) |
| 844 | return 0; | ||
| 844 | EVP_DigestFinal_ex(&ctx, out, &ret); | 845 | EVP_DigestFinal_ex(&ctx, out, &ret); |
| 845 | EVP_MD_CTX_cleanup(&ctx); | 846 | EVP_MD_CTX_cleanup(&ctx); |
| 847 | |||
| 846 | return ((int)ret); | 848 | return ((int)ret); |
| 847 | } | 849 | } |
| 848 | 850 | ||
