bio_b64.c (68651) | bio_b64.c (89837) |
---|---|
1/* crypto/evp/bio_b64.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 * --- 451 unchanged lines hidden (view full) --- 460 case BIO_CTRL_EOF: /* More to read */ 461 if (ctx->cont <= 0) 462 ret=1; 463 else 464 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 465 break; 466 case BIO_CTRL_WPENDING: /* More to write in buffer */ 467 ret=ctx->buf_len-ctx->buf_off; | 1/* crypto/evp/bio_b64.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 * --- 451 unchanged lines hidden (view full) --- 460 case BIO_CTRL_EOF: /* More to read */ 461 if (ctx->cont <= 0) 462 ret=1; 463 else 464 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 465 break; 466 case BIO_CTRL_WPENDING: /* More to write in buffer */ 467 ret=ctx->buf_len-ctx->buf_off; |
468 if ((ret == 0) && (ctx->base64.num != 0)) | 468 if ((ret == 0) && (ctx->encode != B64_NONE) 469 && (ctx->base64.num != 0)) |
469 ret=1; 470 else if (ret <= 0) 471 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 472 break; 473 case BIO_CTRL_PENDING: /* More to read in buffer */ 474 ret=ctx->buf_len-ctx->buf_off; 475 if (ret <= 0) 476 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); --- 18 unchanged lines hidden (view full) --- 495 (unsigned char *)ctx->buf, 496 (unsigned char *)ctx->tmp, 497 ctx->tmp_len); 498 ctx->buf_off=0; 499 ctx->tmp_len=0; 500 goto again; 501 } 502 } | 470 ret=1; 471 else if (ret <= 0) 472 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); 473 break; 474 case BIO_CTRL_PENDING: /* More to read in buffer */ 475 ret=ctx->buf_len-ctx->buf_off; 476 if (ret <= 0) 477 ret=BIO_ctrl(b->next_bio,cmd,num,ptr); --- 18 unchanged lines hidden (view full) --- 496 (unsigned char *)ctx->buf, 497 (unsigned char *)ctx->tmp, 498 ctx->tmp_len); 499 ctx->buf_off=0; 500 ctx->tmp_len=0; 501 goto again; 502 } 503 } |
503 else if (ctx->base64.num != 0) | 504 else if (ctx->encode != B64_NONE && ctx->base64.num != 0) |
504 { 505 ctx->buf_off=0; 506 EVP_EncodeFinal(&(ctx->base64), 507 (unsigned char *)ctx->buf, 508 &(ctx->buf_len)); 509 /* push out the bytes */ 510 goto again; 511 } --- 36 unchanged lines hidden --- | 505 { 506 ctx->buf_off=0; 507 EVP_EncodeFinal(&(ctx->base64), 508 (unsigned char *)ctx->buf, 509 &(ctx->buf_len)); 510 /* push out the bytes */ 511 goto again; 512 } --- 36 unchanged lines hidden --- |