diff options
Diffstat (limited to 'src/lib/libssl/src/crypto/evp/bio_md.c')
-rw-r--r-- | src/lib/libssl/src/crypto/evp/bio_md.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/libssl/src/crypto/evp/bio_md.c b/src/lib/libssl/src/crypto/evp/bio_md.c index 9841e32e1a..144fdfd56a 100644 --- a/src/lib/libssl/src/crypto/evp/bio_md.c +++ b/src/lib/libssl/src/crypto/evp/bio_md.c | |||
@@ -153,8 +153,12 @@ static int md_write(BIO *b, const char *in, int inl) | |||
153 | { | 153 | { |
154 | if (ret > 0) | 154 | if (ret > 0) |
155 | { | 155 | { |
156 | EVP_DigestUpdate(ctx,(const unsigned char *)in, | 156 | if (!EVP_DigestUpdate(ctx,(const unsigned char *)in, |
157 | (unsigned int)ret); | 157 | (unsigned int)ret)) |
158 | { | ||
159 | BIO_clear_retry_flags(b); | ||
160 | return 0; | ||
161 | } | ||
158 | } | 162 | } |
159 | } | 163 | } |
160 | if(b->next_bio != NULL) | 164 | if(b->next_bio != NULL) |
@@ -220,7 +224,8 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
220 | case BIO_CTRL_DUP: | 224 | case BIO_CTRL_DUP: |
221 | dbio=ptr; | 225 | dbio=ptr; |
222 | dctx=dbio->ptr; | 226 | dctx=dbio->ptr; |
223 | EVP_MD_CTX_copy_ex(dctx,ctx); | 227 | if (!EVP_MD_CTX_copy_ex(dctx,ctx)) |
228 | return 0; | ||
224 | b->init=1; | 229 | b->init=1; |
225 | break; | 230 | break; |
226 | default: | 231 | default: |