003 File Manager
Current Path:
/usr/src/crypto/openssl/crypto/bio
usr
/
src
/
crypto
/
openssl
/
crypto
/
bio
/
📁
..
📄
b_addr.c
(25.83 KB)
📄
b_dump.c
(3.95 KB)
📄
b_print.c
(25.63 KB)
📄
b_sock.c
(9.68 KB)
📄
b_sock2.c
(10.23 KB)
📄
bf_buff.c
(12.32 KB)
📄
bf_lbuf.c
(8.67 KB)
📄
bf_nbio.c
(4.19 KB)
📄
bf_null.c
(2.79 KB)
📄
bio_cb.c
(3.05 KB)
📄
bio_err.c
(7.56 KB)
📄
bio_lib.c
(16.86 KB)
📄
bio_local.h
(5.51 KB)
📄
bio_meth.c
(4.82 KB)
📄
bss_acpt.c
(16.08 KB)
📄
bss_bio.c
(18.57 KB)
📄
bss_conn.c
(17.7 KB)
📄
bss_dgram.c
(56.57 KB)
📄
bss_fd.c
(5.69 KB)
📄
bss_file.c
(11.3 KB)
📄
bss_log.c
(9.5 KB)
📄
bss_mem.c
(8.59 KB)
📄
bss_null.c
(1.89 KB)
📄
bss_sock.c
(6.14 KB)
📄
build.info
(338 B)
Editing: bio_cb.c
/* * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "bio_local.h" #include "internal/cryptlib.h" #include <openssl/err.h> long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret) { BIO *b; char buf[256]; char *p; long r = 1; int len, left; if (BIO_CB_RETURN & cmd) r = ret; len = BIO_snprintf(buf, sizeof(buf), "BIO[%p]: ", (void *)bio); /* Ignore errors and continue printing the other information. */ if (len < 0) len = 0; p = buf + len; left = sizeof(buf) - len; switch (cmd) { case BIO_CB_FREE: BIO_snprintf(p, left, "Free - %s\n", bio->method->name); break; case BIO_CB_READ: if (bio->method->type & BIO_TYPE_DESCRIPTOR) BIO_snprintf(p, left, "read(%d,%lu) - %s fd=%d\n", bio->num, (unsigned long)argi, bio->method->name, bio->num); else BIO_snprintf(p, left, "read(%d,%lu) - %s\n", bio->num, (unsigned long)argi, bio->method->name); break; case BIO_CB_WRITE: if (bio->method->type & BIO_TYPE_DESCRIPTOR) BIO_snprintf(p, left, "write(%d,%lu) - %s fd=%d\n", bio->num, (unsigned long)argi, bio->method->name, bio->num); else BIO_snprintf(p, left, "write(%d,%lu) - %s\n", bio->num, (unsigned long)argi, bio->method->name); break; case BIO_CB_PUTS: BIO_snprintf(p, left, "puts() - %s\n", bio->method->name); break; case BIO_CB_GETS: BIO_snprintf(p, left, "gets(%lu) - %s\n", (unsigned long)argi, bio->method->name); break; case BIO_CB_CTRL: BIO_snprintf(p, left, "ctrl(%lu) - %s\n", (unsigned long)argi, bio->method->name); break; case BIO_CB_RETURN | BIO_CB_READ: BIO_snprintf(p, left, "read return %ld\n", ret); break; case BIO_CB_RETURN | BIO_CB_WRITE: BIO_snprintf(p, left, "write return %ld\n", ret); break; case BIO_CB_RETURN | BIO_CB_GETS: BIO_snprintf(p, left, "gets return %ld\n", ret); break; case BIO_CB_RETURN | BIO_CB_PUTS: BIO_snprintf(p, left, "puts return %ld\n", ret); break; case BIO_CB_RETURN | BIO_CB_CTRL: BIO_snprintf(p, left, "ctrl return %ld\n", ret); break; default: BIO_snprintf(p, left, "bio callback - unknown type (%d)\n", cmd); break; } b = (BIO *)bio->cb_arg; if (b != NULL) BIO_write(b, buf, strlen(buf)); #if !defined(OPENSSL_NO_STDIO) else fputs(buf, stderr); #endif return r; }
Upload File
Create Folder