~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/evp/bio_md.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
                {
177
177
        case BIO_CTRL_RESET:
178
178
                if (b->init)
179
 
                        EVP_DigestInit_ex(ctx,ctx->digest, NULL);
 
179
                        ret = EVP_DigestInit_ex(ctx,ctx->digest, NULL);
180
180
                else
181
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
184
                break;
184
185
        case BIO_C_GET_MD:
185
186
                if (b->init)
199
200
                else
200
201
                        ret=0;
201
202
                break;
 
203
        case BIO_C_SET_MD_CTX:
 
204
                if (b->init)
 
205
                        b->ptr=ptr;
 
206
                else
 
207
                        ret=0;
 
208
                break;
202
209
        case BIO_C_DO_STATE_MACHINE:
203
210
                BIO_clear_retry_flags(b);
204
211
                ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
207
214
 
208
215
        case BIO_C_SET_MD:
209
216
                md=ptr;
210
 
                EVP_DigestInit_ex(ctx,md, NULL);
211
 
                b->init=1;
 
217
                ret = EVP_DigestInit_ex(ctx,md, NULL);
 
218
                if (ret > 0)
 
219
                        b->init=1;
212
220
                break;
213
221
        case BIO_CTRL_DUP:
214
222
                dbio=ptr;