Searched defs:bio (Results 1 - 25 of 48) sorted by relevance

12

/external/boringssl/src/crypto/bio/
H A Dprintf.c61 #include <openssl/bio.h>
70 int BIO_printf(BIO *bio, const char *format, ...) { argument
113 ret = BIO_write(bio, out, out_len);
H A Dhexdump.c57 #include <openssl/bio.h>
67 BIO *bio; member in struct:hexdump_ctx
102 BIO_indent(ctx->bio, ctx->indent, UINT_MAX);
109 if (BIO_write(ctx->bio, buf, 10) < 0) {
129 if (BIO_write(ctx->bio, buf, l) < 0) {
138 if (BIO_write(ctx->bio, ctx->right_chars, sizeof(ctx->right_chars)) < 0) {
169 if (BIO_write(ctx->bio, buf, l) < 0) {
176 if (BIO_write(ctx->bio, ctx->right_chars, n_bytes + 2) < 0) {
182 int BIO_hexdump(BIO *bio, const uint8_t *data, size_t len, unsigned indent) { argument
185 ctx.bio
[all...]
H A Dsocket.c1 /* crypto/bio/bss_sock.c */
58 #include <openssl/bio.h>
82 static int sock_new(BIO *bio) { argument
83 bio->init = 0;
84 bio->num = 0;
85 bio->ptr = NULL;
86 bio->flags = 0;
90 static int sock_free(BIO *bio) { argument
91 if (bio == NULL) {
95 if (bio
[all...]
H A Dbio_mem.c57 #include <openssl/bio.h>
100 static int mem_new(BIO *bio) { argument
110 bio->shutdown = 1;
111 bio->init = 1;
112 bio->num = -1;
113 bio->ptr = (char *)b;
118 static int mem_free(BIO *bio) { argument
121 if (bio == NULL) {
125 if (!bio->shutdown || !bio
138 mem_read(BIO *bio, char *out, int outl) argument
165 mem_write(BIO *bio, const char *in, int inl) argument
192 mem_gets(BIO *bio, char *buf, int size) argument
227 mem_ctrl(BIO *bio, int cmd, long num, void *ptr) argument
303 BIO_mem_contents(const BIO *bio, const uint8_t **out_contents, size_t *out_len) argument
316 BIO_get_mem_data(BIO *bio, char **contents) argument
320 BIO_get_mem_ptr(BIO *bio, BUF_MEM **out) argument
324 BIO_set_mem_buf(BIO *bio, BUF_MEM *b, int take_ownership) argument
328 BIO_set_mem_eof_return(BIO *bio, int eof_value) argument
[all...]
H A Dfd.c57 #include <openssl/bio.h>
140 static int fd_new(BIO *bio) { argument
142 bio->num = -1;
146 static int fd_free(BIO *bio) { argument
147 if (bio == NULL) {
151 if (bio->shutdown) {
152 if (bio->init) {
153 BORINGSSL_CLOSE(bio->num);
155 bio->init = 0;
268 int BIO_set_fd(BIO *bio, in argument
272 BIO_get_fd(BIO *bio, int *out_fd) argument
[all...]
H A Dconnect.c57 #include <openssl/bio.h>
101 /* the file descriptor is kept in bio->num in order to match the socket
107 int (*info_callback)(const BIO *bio, int state, int ret);
167 static int conn_state(BIO *bio, BIO_CONNECT *c) { argument
205 &bio->num, &c->them, &c->them_length, c->param_hostname,
213 if (!bio_socket_nbio(bio->num, 1)) {
222 ret = setsockopt(bio->num, SOL_SOCKET, SO_KEEPALIVE, (char *)&i,
231 BIO_clear_retry_flags(bio);
232 ret = connect(bio->num, (struct sockaddr*) &c->them, c->them_length);
235 BIO_set_flags(bio, (BIO_FLAGS_IO_SPECIA
318 conn_new(BIO *bio) argument
326 conn_close_socket(BIO *bio) argument
341 conn_free(BIO *bio) argument
355 conn_read(BIO *bio, char *out, int out_len) argument
379 conn_write(BIO *bio, const char *in, int in_len) argument
403 conn_ctrl(BIO *bio, int cmd, long num, void *ptr) argument
483 conn_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) argument
522 BIO_set_conn_hostname(BIO *bio, const char *name) argument
526 BIO_set_conn_port(BIO *bio, const char *port_str) argument
530 BIO_set_conn_int_port(BIO *bio, const int *port) argument
536 BIO_set_nbio(BIO *bio, int on) argument
540 BIO_do_connect(BIO *bio) argument
[all...]
H A Dfile.c75 #include <openssl/bio.h>
128 static int file_new(BIO *bio) { return 1; } argument
130 static int file_free(BIO *bio) { argument
131 if (bio == NULL) {
135 if (!bio->shutdown) {
139 if (bio->init && bio->ptr != NULL) {
140 fclose(bio->ptr);
141 bio->ptr = NULL;
143 bio
287 BIO_get_fp(BIO *bio, FILE **out_file) argument
291 BIO_set_fp(BIO *bio, FILE *file, int close_flag) argument
295 BIO_read_filename(BIO *bio, const char *filename) argument
300 BIO_write_filename(BIO *bio, const char *filename) argument
305 BIO_append_filename(BIO *bio, const char *filename) argument
310 BIO_rw_filename(BIO *bio, const char *filename) argument
[all...]
H A Dpair.c53 #include <openssl/bio.h>
84 static int bio_new(BIO *bio) { argument
94 bio->ptr = b;
98 static void bio_destroy_pair(BIO *bio) { argument
99 struct bio_bio_st *b = bio->ptr;
115 assert(peer_b->peer == bio);
124 bio->init = 0;
130 static int bio_free(BIO *bio) { argument
133 if (bio == NULL) {
136 b = bio
150 bio_read(BIO *bio, char *buf, int size_) argument
233 bio_write(BIO *bio, const char *buf, int num_) argument
359 bio_ctrl(BIO *bio, int cmd, long num, void *ptr) argument
479 BIO_ctrl_get_read_request(BIO *bio) argument
483 BIO_ctrl_get_write_guarantee(BIO *bio) argument
487 BIO_shutdown_wr(BIO *bio) argument
[all...]
/external/curl/docs/examples/
H A Dcacertinmem.c41 BIO * bio; local
85 bio=BIO_new_mem_buf(mypem, -1);
89 PEM_read_bio_X509(bio, &cert, 0, NULL);
102 BIO_free(bio);
H A Dusercertinmem.c48 BIO *bio = NULL; local
121 bio = BIO_new_mem_buf((char *)mypem, -1);
123 if(bio == NULL) {
130 cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
141 /*create a bio for the RSA key*/
147 /*read the key bio into an RSA object*/
150 printf("Failed to create key bio\n");
160 if(bio)
161 BIO_free(bio);
/external/libbrillo/brillo/streams/
H A Dopenssl_stream_bio.cc7 #include <openssl/bio.h>
17 int stream_write(BIO* bio, const char* buf, int size) { argument
18 brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr);
20 BIO_clear_retry_flags(bio);
26 BIO_set_retry_write(bio);
32 int stream_read(BIO* bio, char* buf, int size) { argument
33 brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr);
35 BIO_clear_retry_flags(bio);
43 BIO_set_retry_read(bio);
50 long stream_ctrl(BIO* bio, in argument
58 stream_new(BIO* bio) argument
65 stream_free(BIO* bio) argument
93 BIO* bio = BIO_new(&stream_method); local
[all...]
/external/libchrome/crypto/
H A Dopenssl_bio_string.cc7 #include <openssl/bio.h>
14 int bio_string_write(BIO* bio, const char* data, int len) { argument
15 reinterpret_cast<std::string*>(bio->ptr)->append(data, len);
19 int bio_string_puts(BIO* bio, const char* data) { argument
21 return bio_string_write(bio, data, strlen(data));
24 long bio_string_ctrl(BIO* bio, int cmd, long num, void* ptr) { argument
25 std::string* str = reinterpret_cast<std::string*>(bio->ptr);
41 int bio_string_new(BIO* bio) { argument
42 bio->ptr = NULL;
43 bio
47 bio_string_free(BIO* bio) argument
69 BIO* bio = BIO_new(&bio_string_methods); local
[all...]
/external/boringssl/src/ssl/
H A Dbio_ssl.c12 #include <openssl/bio.h>
15 static int ssl_read(BIO *bio, char *out, int outl) { argument
16 SSL *ssl = bio->ptr;
21 BIO_clear_retry_flags(bio);
27 BIO_set_retry_read(bio);
31 BIO_set_retry_write(bio);
35 BIO_set_retry_special(bio);
36 bio->retry_reason = BIO_RR_ACCEPT;
40 BIO_set_retry_special(bio);
41 bio
55 ssl_write(BIO *bio, const char *out, int outl) argument
89 ssl_ctrl(BIO *bio, int cmd, long num, void *ptr) argument
132 ssl_new(BIO *bio) argument
136 ssl_free(BIO *bio) argument
151 ssl_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) argument
173 BIO_set_ssl(BIO *bio, SSL *ssl, int take_owership) argument
[all...]
/external/google-tv-pairing-protocol/cpp/src/polo/util/
H A Dcertificateutil.cc25 BIO* bio = BIO_new_mem_buf(&pem[0], pem.size()); local
26 X509* x509 = PEM_read_bio_X509(bio, NULL, 0, NULL);
27 BIO_free(bio);
41 BIO* bio = BIO_new(BIO_s_mem()); local
42 PEM_write_bio_X509(bio, x509);
43 BIO_flush(bio);
46 size_t data_size = BIO_get_mem_data(bio, &data);
49 BIO_free(bio);
56 BIO* bio = BIO_new_mem_buf(&pem[0], pem.size()); local
57 EVP_PKEY* pkey = PEM_read_bio_PrivateKey(bio, NUL
65 BIO* bio = BIO_new(BIO_s_mem()); local
[all...]
/external/pdfium/third_party/libopenjpeg20/
H A Dbio.c48 @param bio BIO handle
51 static void opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b);
54 @param bio BIO handle
57 static OPJ_UINT32 opj_bio_getbit(opj_bio_t *bio);
60 @param bio BIO handle
63 static OPJ_BOOL opj_bio_byteout(opj_bio_t *bio);
66 @param bio BIO handle
69 static OPJ_BOOL opj_bio_bytein(opj_bio_t *bio);
81 static OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) { argument
82 bio
91 opj_bio_bytein(opj_bio_t *bio) argument
101 opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b) argument
109 opj_bio_getbit(opj_bio_t *bio) argument
124 opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t)); local
128 opj_bio_destroy(opj_bio_t *bio) argument
134 opj_bio_numbytes(opj_bio_t *bio) argument
138 opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len) argument
146 opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len) argument
154 opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n) argument
161 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n) argument
171 opj_bio_flush(opj_bio_t *bio) argument
183 opj_bio_inalign(opj_bio_t *bio) argument
[all...]
H A Dtgt.c260 void opj_tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold) { argument
284 opj_bio_write(bio, 1, 1);
289 opj_bio_write(bio, 0, 1);
300 OPJ_UINT32 opj_tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold) { argument
321 if (opj_bio_read(bio, 1)) {
/external/syslinux/efi/
H A Ddiskio.c11 static inline EFI_STATUS read_blocks(EFI_BLOCK_IO *bio, uint32_t id, argument
14 return uefi_call_wrapper(bio->ReadBlocks, 5, bio, id, lba, bytes, buf);
17 static inline EFI_STATUS write_blocks(EFI_BLOCK_IO *bio, uint32_t id, argument
20 return uefi_call_wrapper(bio->WriteBlocks, 5, bio, id, lba, bytes, buf);
27 EFI_BLOCK_IO *bio = priv->bio; local
32 status = write_blocks(bio, disk->disk_number, lba, bytes, buf);
34 status = read_blocks(bio, dis
49 EFI_BLOCK_IO *bio; local
[all...]
H A Defi.h34 EFI_BLOCK_IO *bio; member in struct:efi_disk_private
/external/boringssl/src/crypto/x509/
H A Dpkcs7_test.c601 BIO *bio = BIO_new_mem_buf(pem, strlen(pem)); local
604 if (!PKCS7_get_PEM_certificates(certs, bio)) {
616 BIO_free(bio);
623 BIO *bio = BIO_new_mem_buf(pem, strlen(pem)); local
626 if (!PKCS7_get_PEM_CRLs(crls, bio)) {
637 BIO_free(bio);
H A Dt_req.c68 BIO *bio = BIO_new(BIO_s_file()); local
69 if (bio == NULL) {
74 BIO_set_fp(bio, fp, BIO_NOCLOSE);
75 int ret = X509_REQ_print(bio, x);
76 BIO_free(bio);
80 int X509_REQ_print_ex(BIO *bio, X509_REQ *x, unsigned long nmflags, argument
100 if (BIO_write(bio, "Certificate Request:\n", 21) <= 0 ||
101 BIO_write(bio, " Data:\n", 10) <= 0) {
107 if (BIO_printf(bio, "%8sVersion: %ld (0x%lx)\n", "", l + 1, l) <= 0) {
112 if (BIO_printf(bio, " Subjec
244 X509_REQ_print(BIO *bio, X509_REQ *req) argument
[all...]
/external/boringssl/src/tool/
H A Dserver.cc240 BIO *bio = BIO_new_socket(sock, BIO_CLOSE); local
242 SSL_set_bio(ssl.get(), bio, bio);
/external/boringssl/src/ssl/test/
H A Dasync_bio.cc20 #include <openssl/bio.h>
37 AsyncBio *GetData(BIO *bio) { argument
38 if (bio->method != &g_async_bio_method) {
41 return (AsyncBio *)bio->ptr;
44 static int AsyncWrite(BIO *bio, const char *in, int inl) { argument
45 AsyncBio *a = GetData(bio);
46 if (a == NULL || bio->next_bio == NULL) {
51 return BIO_write(bio->next_bio, in, inl);
54 BIO_clear_retry_flags(bio);
57 BIO_set_retry_write(bio);
74 AsyncRead(BIO *bio, char *out, int outl) argument
100 AsyncCtrl(BIO *bio, int cmd, long num, void *ptr) argument
110 AsyncNew(BIO *bio) argument
122 AsyncFree(BIO *bio) argument
134 AsyncCallbackCtrl(BIO *bio, int cmd, bio_info_cb fp) argument
169 AsyncBioAllowRead(BIO *bio, size_t count) argument
177 AsyncBioAllowWrite(BIO *bio, size_t count) argument
185 AsyncBioEnforceWriteQuota(BIO *bio, bool enforce) argument
[all...]
H A Dpacketed_bio.cc49 PacketedBio *GetData(BIO *bio) { argument
50 if (bio->method != &g_packeted_bio_method) {
53 return (PacketedBio *)bio->ptr;
56 // ReadAll reads |len| bytes from |bio| into |out|. It returns 1 on success and
58 static int ReadAll(BIO *bio, uint8_t *out, size_t len) { argument
64 int ret = BIO_read(bio, out, chunk_len);
74 static int PacketedWrite(BIO *bio, const char *in, int inl) { argument
75 if (bio->next_bio == NULL) {
79 BIO_clear_retry_flags(bio);
88 int ret = BIO_write(bio
104 PacketedRead(BIO *bio, char *out, int outl) argument
192 PacketedCtrl(BIO *bio, int cmd, long num, void *ptr) argument
203 PacketedNew(BIO *bio) argument
208 PacketedFree(BIO *bio) argument
218 PacketedCallbackCtrl(BIO *bio, int cmd, bio_info_cb fp) argument
249 PacketedBioAdvanceClock(BIO *bio) argument
[all...]
/external/boringssl/src/decrepit/bio/
H A Dbase64_bio.c63 #include <openssl/bio.h>
91 static int b64_new(BIO *bio) { argument
104 bio->init = 1;
105 bio->ptr = (char *)ctx;
109 static int b64_free(BIO *bio) { argument
110 if (bio == NULL) {
113 OPENSSL_free(bio->ptr);
114 bio->ptr = NULL;
115 bio->init = 0;
116 bio
[all...]
/external/libbrillo/policy/
H A Ddevice_policy_impl.cc49 BIO* bio = BIO_new_mem_buf(key, public_key.length()); local
50 if (!bio) {
55 EVP_PKEY* public_key_ssl = d2i_PUBKEY_bio(bio, nullptr);
57 BIO_free_all(bio);
73 BIO_free_all(bio);

Completed in 503 milliseconds

12