diff options
| author | djm <> | 2005-04-29 05:39:33 +0000 | 
|---|---|---|
| committer | djm <> | 2005-04-29 05:39:33 +0000 | 
| commit | 68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch) | |
| tree | 3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libcrypto/evp/bio_md.c | |
| parent | f396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff) | |
| download | openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.gz openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.bz2 openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/evp/bio_md.c')
| -rw-r--r-- | src/lib/libcrypto/evp/bio_md.c | 19 | 
1 files changed, 11 insertions, 8 deletions
| diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c index c632dfb202..f4aa41ac4b 100644 --- a/src/lib/libcrypto/evp/bio_md.c +++ b/src/lib/libcrypto/evp/bio_md.c | |||
| @@ -176,10 +176,11 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 176 | { | 176 | { | 
| 177 | case BIO_CTRL_RESET: | 177 | case BIO_CTRL_RESET: | 
| 178 | if (b->init) | 178 | if (b->init) | 
| 179 | EVP_DigestInit_ex(ctx,ctx->digest, NULL); | 179 | ret = EVP_DigestInit_ex(ctx,ctx->digest, NULL); | 
| 180 | else | 180 | else | 
| 181 | ret=0; | 181 | ret=0; | 
| 182 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | 182 | if (ret > 0) | 
| 183 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 183 | break; | 184 | break; | 
| 184 | case BIO_C_GET_MD: | 185 | case BIO_C_GET_MD: | 
| 185 | if (b->init) | 186 | if (b->init) | 
| @@ -191,11 +192,12 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 191 | ret=0; | 192 | ret=0; | 
| 192 | break; | 193 | break; | 
| 193 | case BIO_C_GET_MD_CTX: | 194 | case BIO_C_GET_MD_CTX: | 
| 195 | pctx=ptr; | ||
| 196 | *pctx=ctx; | ||
| 197 | break; | ||
| 198 | case BIO_C_SET_MD_CTX: | ||
| 194 | if (b->init) | 199 | if (b->init) | 
| 195 | { | 200 | b->ptr=ptr; | 
| 196 | pctx=ptr; | ||
| 197 | *pctx=ctx; | ||
| 198 | } | ||
| 199 | else | 201 | else | 
| 200 | ret=0; | 202 | ret=0; | 
| 201 | break; | 203 | break; | 
| @@ -207,8 +209,9 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 207 | 209 | ||
| 208 | case BIO_C_SET_MD: | 210 | case BIO_C_SET_MD: | 
| 209 | md=ptr; | 211 | md=ptr; | 
| 210 | EVP_DigestInit_ex(ctx,md, NULL); | 212 | ret = EVP_DigestInit_ex(ctx,md, NULL); | 
| 211 | b->init=1; | 213 | if (ret > 0) | 
| 214 | b->init=1; | ||
| 212 | break; | 215 | break; | 
| 213 | case BIO_CTRL_DUP: | 216 | case BIO_CTRL_DUP: | 
| 214 | dbio=ptr; | 217 | dbio=ptr; | 
