Go to the documentation of this file.
68 #include "../../crypto/internal.h"
71 #define B64_BLOCK_SIZE 1024
72 #define B64_BLOCK_SIZE2 768
76 #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
121 int ret = 0,
i, ii, j,
k,
x,
n,
num, ret_code = 0;
130 if (
ctx == NULL ||
b->next_bio == NULL) {
145 if (
ctx->buf_len > 0) {
146 assert(
ctx->buf_len >=
ctx->buf_off);
147 i =
ctx->buf_len -
ctx->buf_off;
151 assert(
ctx->buf_off +
i < (
int)
sizeof(
ctx->buf));
157 if (
ctx->buf_len ==
ctx->buf_off) {
168 if (
ctx->cont <= 0) {
182 if (
ctx->tmp_len == 0) {
201 }
else if (
ctx->start) {
204 for (j = 0; j <
i; j++) {
205 if (*(q++) !=
'\n') {
220 if (k <= 0 && num == 0 && ctx->
start) {
225 for (
x = 0;
x <
i;
x++) {
237 if (j ==
i &&
num == 0) {
248 for (ii = 0; ii <
n; ii++) {
249 ctx->tmp[ii] =
p[ii];
258 }
else if (i < B64_BLOCK_SIZE && ctx->cont > 0) {
270 if (
ctx->tmp[jj - 1] ==
'=') {
272 if (
ctx->tmp[jj - 2] ==
'=') {
280 ctx->tmp_len =
i - jj;
299 if (
ctx->buf_len <= outl) {
308 if (
ctx->buf_off ==
ctx->buf_len) {
317 return ret == 0 ? ret_code :
ret;
335 assert(
ctx->buf_off < (
int)
sizeof(
ctx->buf));
336 assert(
ctx->buf_len <= (
int)
sizeof(
ctx->buf));
337 assert(
ctx->buf_len >=
ctx->buf_off);
339 n =
ctx->buf_len -
ctx->buf_off;
348 assert(
ctx->buf_off <= (
int)
sizeof(
ctx->buf));
349 assert(
ctx->buf_len >=
ctx->buf_off);
357 if (
in == NULL || inl <= 0) {
365 if (
ctx->tmp_len > 0) {
366 assert(
ctx->tmp_len <= 3);
367 n = 3 -
ctx->tmp_len;
375 if (
ctx->tmp_len < 3) {
380 assert(
ctx->buf_len <= (
int)
sizeof(
ctx->buf));
381 assert(
ctx->buf_len >=
ctx->buf_off);
396 assert(
ctx->buf_len <= (
int)
sizeof(
ctx->buf));
397 assert(
ctx->buf_len >=
ctx->buf_off);
403 assert(
ctx->buf_len <= (
int)
sizeof(
ctx->buf));
404 assert(
ctx->buf_len >=
ctx->buf_off);
422 assert(
ctx->buf_off <= (
int)
sizeof(
ctx->buf));
423 assert(
ctx->buf_len >=
ctx->buf_off);
447 if (
ctx->cont <= 0) {
455 assert(
ctx->buf_len >=
ctx->buf_off);
459 }
else if (
ret <= 0) {
465 assert(
ctx->buf_len >=
ctx->buf_off);
475 while (
ctx->buf_len !=
ctx->buf_off) {
482 if (
ctx->tmp_len != 0) {
489 }
else if (
ctx->encode !=
B64_NONE &&
ctx->base64.data_used != 0) {
516 if (
b->next_bio == NULL) {
long(* bio_info_cb)(BIO *bio, int event, const char *parg, int cmd, long larg, long return_value)
#define BIO_CTRL_WPENDING
#define BIO_FLAGS_BASE64_NO_NL
static struct test_ctx ctx
static void * OPENSSL_memset(void *dst, int c, size_t n)
static int b64_read(BIO *b, char *out, int outl)
#define BIO_copy_next_retry
const BIO_METHOD * BIO_f_base64(void)
#define BIO_C_DO_STATE_MACHINE
for(map_begin_internal(intern, &it);!map_done(&it);map_next(&it))
static int b64_free(BIO *bio)
static long b64_ctrl(BIO *b, int cmd, long num, void *ptr)
struct b64_struct BIO_B64_CTX
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
#define BIO_callback_ctrl
static const BIO_METHOD b64_method
static int b64_write(BIO *b, const char *in, int inl)
UniquePtr< SSL_SESSION > ret
static void * OPENSSL_memmove(void *dst, const void *src, size_t n)
static int b64_new(BIO *bio)
#define EVP_ENCODE_LENGTH(l)
static long b64_callback_ctrl(BIO *b, int cmd, bio_info_cb fp)
if(p->owned &&p->wrapped !=NULL)
#define BIO_clear_retry_flags
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:45