diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/evp/bio_b64.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/evp/bio_b64.c')
-rw-r--r-- | src/lib/libcrypto/evp/bio_b64.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index 84729119df..bd5e24f993 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
@@ -69,6 +69,7 @@ static int b64_read(BIO *h,char *buf,int size); | |||
69 | static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); |
70 | static int b64_new(BIO *h); | 70 | static int b64_new(BIO *h); |
71 | static int b64_free(BIO *data); | 71 | static int b64_free(BIO *data); |
72 | static long b64_callback_ctrl(BIO *h,int cmd,void (*fp)()); | ||
72 | #define B64_BLOCK_SIZE 1024 | 73 | #define B64_BLOCK_SIZE 1024 |
73 | #define B64_BLOCK_SIZE2 768 | 74 | #define B64_BLOCK_SIZE2 768 |
74 | #define B64_NONE 0 | 75 | #define B64_NONE 0 |
@@ -100,6 +101,7 @@ static BIO_METHOD methods_b64= | |||
100 | b64_ctrl, | 101 | b64_ctrl, |
101 | b64_new, | 102 | b64_new, |
102 | b64_free, | 103 | b64_free, |
104 | b64_callback_ctrl, | ||
103 | }; | 105 | }; |
104 | 106 | ||
105 | BIO_METHOD *BIO_f_base64(void) | 107 | BIO_METHOD *BIO_f_base64(void) |
@@ -237,8 +239,8 @@ static int b64_read(BIO *b, char *out, int outl) | |||
237 | &(ctx->tmp[0])); | 239 | &(ctx->tmp[0])); |
238 | for (x=0; x < i; x++) | 240 | for (x=0; x < i; x++) |
239 | ctx->tmp[x]=p[x]; | 241 | ctx->tmp[x]=p[x]; |
240 | EVP_DecodeInit(&ctx->base64); | ||
241 | } | 242 | } |
243 | EVP_DecodeInit(&ctx->base64); | ||
242 | ctx->start=0; | 244 | ctx->start=0; |
243 | break; | 245 | break; |
244 | } | 246 | } |
@@ -522,3 +524,17 @@ again: | |||
522 | return(ret); | 524 | return(ret); |
523 | } | 525 | } |
524 | 526 | ||
527 | static long b64_callback_ctrl(BIO *b, int cmd, void (*fp)()) | ||
528 | { | ||
529 | long ret=1; | ||
530 | |||
531 | if (b->next_bio == NULL) return(0); | ||
532 | switch (cmd) | ||
533 | { | ||
534 | default: | ||
535 | ret=BIO_callback_ctrl(b->next_bio,cmd,fp); | ||
536 | break; | ||
537 | } | ||
538 | return(ret); | ||
539 | } | ||
540 | |||