bio_enc.c (160815) | bio_enc.c (238405) |
---|---|
1/* crypto/evp/bio_enc.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 347 unchanged lines hidden (view full) --- 356 case BIO_C_GET_CIPHER_CTX: 357 c_ctx=(EVP_CIPHER_CTX **)ptr; 358 (*c_ctx)= &(ctx->cipher); 359 b->init=1; 360 break; 361 case BIO_CTRL_DUP: 362 dbio=(BIO *)ptr; 363 dctx=(BIO_ENC_CTX *)dbio->ptr; | 1/* crypto/evp/bio_enc.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 347 unchanged lines hidden (view full) --- 356 case BIO_C_GET_CIPHER_CTX: 357 c_ctx=(EVP_CIPHER_CTX **)ptr; 358 (*c_ctx)= &(ctx->cipher); 359 b->init=1; 360 break; 361 case BIO_CTRL_DUP: 362 dbio=(BIO *)ptr; 363 dctx=(BIO_ENC_CTX *)dbio->ptr; |
364 memcpy(&(dctx->cipher),&(ctx->cipher),sizeof(ctx->cipher)); 365 dbio->init=1; | 364 EVP_CIPHER_CTX_init(&dctx->cipher); 365 ret = EVP_CIPHER_CTX_copy(&dctx->cipher,&ctx->cipher); 366 if (ret) 367 dbio->init=1; |
366 break; 367 default: 368 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 369 break; 370 } 371 return(ret); 372 } 373 --- 53 unchanged lines hidden --- | 368 break; 369 default: 370 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 371 break; 372 } 373 return(ret); 374 } 375 --- 53 unchanged lines hidden --- |