/external/boringssl/src/crypto/bio/ |
D | bio.c | 73 static int bio_set(BIO *bio, const BIO_METHOD *method) { in bio_set() argument 77 memset(bio, 0, sizeof(BIO)); in bio_set() 79 bio->method = method; in bio_set() 80 bio->shutdown = 1; in bio_set() 81 bio->references = 1; in bio_set() 83 if (method->create != NULL && !method->create(bio)) { in bio_set() 105 int BIO_free(BIO *bio) { in BIO_free() argument 108 for (; bio != NULL; bio = next_bio) { in BIO_free() 109 if (!CRYPTO_refcount_dec_and_test_zero(&bio->references)) { in BIO_free() 113 if (bio->callback != NULL) { in BIO_free() [all …]
|
D | connect.c | 108 int (*info_callback)(const BIO *bio, int state, int ret); 131 static int conn_state(BIO *bio, BIO_CONNECT *c) { in conn_state() argument 176 &bio->num, &c->them, &c->them_length, c->param_hostname, in conn_state() 187 if (!bio_socket_nbio(bio->num, 1)) { in conn_state() 196 ret = setsockopt(bio->num, SOL_SOCKET, SO_KEEPALIVE, (char *)&i, in conn_state() 205 BIO_clear_retry_flags(bio); in conn_state() 206 ret = connect(bio->num, (struct sockaddr*) &c->them, c->them_length); in conn_state() 209 BIO_set_flags(bio, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY)); in conn_state() 211 bio->retry_reason = BIO_RR_CONNECT; in conn_state() 225 i = bio_sock_error(bio->num); in conn_state() [all …]
|
D | bio_mem.c | 97 static int mem_new(BIO *bio) { in mem_new() argument 107 bio->shutdown = 1; in mem_new() 108 bio->init = 1; in mem_new() 109 bio->num = -1; in mem_new() 110 bio->ptr = (char *)b; in mem_new() 115 static int mem_free(BIO *bio) { in mem_free() argument 118 if (bio == NULL) { in mem_free() 122 if (!bio->shutdown || !bio->init || bio->ptr == NULL) { in mem_free() 126 b = (BUF_MEM *)bio->ptr; in mem_free() 127 if (bio->flags & BIO_FLAGS_MEM_RDONLY) { in mem_free() [all …]
|
D | pair.c | 88 static int bio_new(BIO *bio) { in bio_new() argument 98 bio->ptr = b; in bio_new() 102 static void bio_destroy_pair(BIO *bio) { in bio_destroy_pair() argument 103 struct bio_bio_st *b = bio->ptr; in bio_destroy_pair() 119 assert(peer_b->peer == bio); in bio_destroy_pair() 128 bio->init = 0; in bio_destroy_pair() 134 static int bio_free(BIO *bio) { in bio_free() argument 137 if (bio == NULL) { in bio_free() 140 b = bio->ptr; in bio_free() 145 bio_destroy_pair(bio); in bio_free() [all …]
|
D | file.c | 164 static int file_new(BIO *bio) { return 1; } in file_new() argument 166 static int file_free(BIO *bio) { in file_free() argument 167 if (bio == NULL) { in file_free() 171 if (!bio->shutdown) { in file_free() 175 if (bio->init && bio->ptr != NULL) { in file_free() 176 fclose(bio->ptr); in file_free() 177 bio->ptr = NULL; in file_free() 179 bio->init = 0; in file_free() 324 int BIO_get_fp(BIO *bio, FILE **out_file) { in BIO_get_fp() argument 325 return BIO_ctrl(bio, BIO_C_GET_FILE_PTR, 0, (char*) out_file); in BIO_get_fp() [all …]
|
D | socket.c | 82 static int sock_new(BIO *bio) { in sock_new() argument 83 bio->init = 0; in sock_new() 84 bio->num = 0; in sock_new() 85 bio->ptr = NULL; in sock_new() 86 bio->flags = 0; in sock_new() 90 static int sock_free(BIO *bio) { in sock_free() argument 91 if (bio == NULL) { in sock_free() 95 if (bio->shutdown) { in sock_free() 96 if (bio->init) { in sock_free() 97 closesocket(bio->num); in sock_free() [all …]
|
D | buffer.c | 90 static int buffer_new(BIO *bio) { in buffer_new() argument 110 bio->init = 1; in buffer_new() 111 bio->ptr = (char *)ctx; in buffer_new() 122 static int buffer_free(BIO *bio) { in buffer_free() argument 125 if (bio == NULL || bio->ptr == NULL) { in buffer_free() 129 ctx = (BIO_F_BUFFER_CTX *)bio->ptr; in buffer_free() 132 OPENSSL_free(bio->ptr); in buffer_free() 134 bio->ptr = NULL; in buffer_free() 135 bio->init = 0; in buffer_free() 136 bio->flags = 0; in buffer_free() [all …]
|
D | fd.c | 133 static int fd_new(BIO *bio) { in fd_new() argument 135 bio->num = -1; in fd_new() 139 static int fd_free(BIO *bio) { in fd_free() argument 140 if (bio == NULL) { in fd_free() 144 if (bio->shutdown) { in fd_free() 145 if (bio->init) { in fd_free() 146 close(bio->num); in fd_free() 148 bio->init = 0; in fd_free() 264 int BIO_set_fd(BIO *bio, int fd, int close_flag) { in BIO_set_fd() argument 265 return BIO_int_ctrl(bio, BIO_C_SET_FD, close_flag, fd); in BIO_set_fd() [all …]
|
D | hexdump.c | 65 BIO *bio; member 101 BIO_indent(ctx->bio, ctx->indent, UINT_MAX); in hexdump_write() 108 if (BIO_write(ctx->bio, buf, 10) < 0) { in hexdump_write() 128 if (BIO_write(ctx->bio, buf, l) < 0) { in hexdump_write() 137 if (BIO_write(ctx->bio, ctx->right_chars, sizeof(ctx->right_chars)) < 0) { in hexdump_write() 168 if (BIO_write(ctx->bio, buf, l) < 0) { in finish() 175 if (BIO_write(ctx->bio, ctx->right_chars, n_bytes + 2) < 0) { in finish() 181 int BIO_hexdump(BIO *bio, const uint8_t *data, size_t len, unsigned indent) { in BIO_hexdump() argument 184 ctx.bio = bio; in BIO_hexdump()
|
D | bio_test.cc | 106 ScopedBIO bio(BIO_new_connect(hostname)); in TestSocketConnect() local 107 if (!bio) { in TestSocketConnect() 112 if (BIO_write(bio.get(), kTestMessage, sizeof(kTestMessage)) != in TestSocketConnect() 141 static size_t BioReadZeroCopyWrapper(BIO *bio, uint8_t *data, size_t len) { in BioReadZeroCopyWrapper() argument 148 if (!BIO_zero_copy_get_read_buf(bio, &read_buf, &read_buf_offset, in BioReadZeroCopyWrapper() 156 BIO_zero_copy_get_read_buf_done(bio, available_bytes); in BioReadZeroCopyWrapper() 166 static size_t BioWriteZeroCopyWrapper(BIO *bio, const uint8_t *data, in BioWriteZeroCopyWrapper() argument 174 if (!BIO_zero_copy_get_write_buf(bio, &write_buf, &write_buf_offset, in BioWriteZeroCopyWrapper() 182 BIO_zero_copy_get_write_buf_done(bio, available_bytes); in BioWriteZeroCopyWrapper() 290 ScopedBIO bio(BIO_new(BIO_s_mem())); in TestPrintf() local [all …]
|
/external/pdfium/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/ |
D | bio.c | 51 static void opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b); 57 static OPJ_UINT32 opj_bio_getbit(opj_bio_t *bio); 63 static OPJ_BOOL opj_bio_byteout(opj_bio_t *bio); 69 static OPJ_BOOL opj_bio_bytein(opj_bio_t *bio); 81 OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) { in opj_bio_byteout() argument 82 bio->buf = (bio->buf << 8) & 0xffff; in opj_bio_byteout() 83 bio->ct = bio->buf == 0xff00 ? 7 : 8; in opj_bio_byteout() 84 if ((OPJ_SIZE_T)bio->bp >= (OPJ_SIZE_T)bio->end) { in opj_bio_byteout() 87 *bio->bp++ = (OPJ_BYTE)(bio->buf >> 8); in opj_bio_byteout() 91 OPJ_BOOL opj_bio_bytein(opj_bio_t *bio) { in opj_bio_bytein() argument [all …]
|
D | bio.h | 81 void opj_bio_destroy(opj_bio_t *bio); 87 ptrdiff_t opj_bio_numbytes(opj_bio_t *bio); 94 void opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len); 101 void opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len); 108 void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n); 115 OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n); 121 OPJ_BOOL opj_bio_flush(opj_bio_t *bio); 127 OPJ_BOOL opj_bio_inalign(opj_bio_t *bio);
|
D | t2.c | 48 static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n); 50 static OPJ_UINT32 opj_t2_getcommacode(opj_bio_t *bio); 56 static void opj_t2_putnumpasses(opj_bio_t *bio, OPJ_UINT32 n); 57 static OPJ_UINT32 opj_t2_getnumpasses(opj_bio_t *bio); 154 static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n) { in opj_t2_putcommacode() argument 156 opj_bio_write(bio, 1, 1); in opj_t2_putcommacode() 158 opj_bio_write(bio, 0, 1); in opj_t2_putcommacode() 161 OPJ_UINT32 opj_t2_getcommacode(opj_bio_t *bio) in opj_t2_getcommacode() argument 164 while (opj_bio_read(bio, 1)) { in opj_t2_getcommacode() 170 void opj_t2_putnumpasses(opj_bio_t *bio, OPJ_UINT32 n) { in opj_t2_putnumpasses() argument [all …]
|
/external/boringssl/src/ssl/test/ |
D | async_bio.cc | 33 AsyncBio *GetData(BIO *bio) { in GetData() argument 34 if (bio->method != &g_async_bio_method) { in GetData() 37 return (AsyncBio *)bio->ptr; in GetData() 40 static int AsyncWrite(BIO *bio, const char *in, int inl) { in AsyncWrite() argument 41 AsyncBio *a = GetData(bio); in AsyncWrite() 42 if (a == NULL || bio->next_bio == NULL) { in AsyncWrite() 49 return BIO_write(bio->next_bio, in, inl); in AsyncWrite() 52 BIO_clear_retry_flags(bio); in AsyncWrite() 55 BIO_set_retry_write(bio); in AsyncWrite() 63 int ret = BIO_write(bio->next_bio, in, inl); in AsyncWrite() [all …]
|
D | packeted_bio.cc | 35 static int ReadAll(BIO *bio, uint8_t *out, size_t len) { in ReadAll() argument 41 int ret = BIO_read(bio, out, chunk_len); in ReadAll() 51 static int PacketedWrite(BIO *bio, const char *in, int inl) { in PacketedWrite() argument 52 if (bio->next_bio == NULL) { in PacketedWrite() 56 BIO_clear_retry_flags(bio); in PacketedWrite() 65 int ret = BIO_write(bio->next_bio, header, sizeof(header)); in PacketedWrite() 67 BIO_copy_next_retry(bio); in PacketedWrite() 72 ret = BIO_write(bio->next_bio, in, inl); in PacketedWrite() 74 BIO_copy_next_retry(bio); in PacketedWrite() 81 static int PacketedRead(BIO *bio, char *out, int outl) { in PacketedRead() argument [all …]
|
/external/boringssl/src/include/openssl/ |
D | bio.h | 92 OPENSSL_EXPORT int BIO_free(BIO *bio); 98 OPENSSL_EXPORT void BIO_vfree(BIO *bio); 101 OPENSSL_EXPORT BIO *BIO_up_ref(BIO *bio); 108 OPENSSL_EXPORT int BIO_read(BIO *bio, void *data, int len); 118 OPENSSL_EXPORT int BIO_gets(BIO *bio, char *buf, int size); 122 OPENSSL_EXPORT int BIO_write(BIO *bio, const void *data, int len); 126 OPENSSL_EXPORT int BIO_puts(BIO *bio, const char *buf); 130 OPENSSL_EXPORT int BIO_flush(BIO *bio); 140 OPENSSL_EXPORT long BIO_ctrl(BIO *bio, int cmd, long larg, void *parg); 154 OPENSSL_EXPORT int BIO_reset(BIO *bio); [all …]
|
/external/google-tv-pairing-protocol/cpp/src/polo/util/ |
D | certificateutil.cc | 25 BIO* bio = BIO_new_mem_buf(&pem[0], pem.size()); in X509FromPEM() local 26 X509* x509 = PEM_read_bio_X509(bio, NULL, 0, NULL); in X509FromPEM() 27 BIO_free(bio); in X509FromPEM() 41 BIO* bio = BIO_new(BIO_s_mem()); in X509ToPEM() local 42 PEM_write_bio_X509(bio, x509); in X509ToPEM() 43 BIO_flush(bio); in X509ToPEM() 46 size_t data_size = BIO_get_mem_data(bio, &data); in X509ToPEM() 49 BIO_free(bio); in X509ToPEM() 56 BIO* bio = BIO_new_mem_buf(&pem[0], pem.size()); in PKEYFromPEM() local 57 EVP_PKEY* pkey = PEM_read_bio_PrivateKey(bio, NULL, 0, &passphrase[0]); in PKEYFromPEM() [all …]
|
/external/boringssl/src/tool/ |
D | client.cc | 78 ScopedBIO bio(BIO_new(BIO_s_file())); in LoadPrivateKey() local 79 if (!bio || !BIO_read_filename(bio.get(), file.c_str())) { in LoadPrivateKey() 82 ScopedEVP_PKEY pkey(PEM_read_bio_PrivateKey(bio.get(), nullptr, nullptr, in LoadPrivateKey() 222 ScopedBIO bio(BIO_new_socket(sock, BIO_CLOSE)); in Client() local 229 SSL_set_bio(ssl.get(), bio.get(), bio.get()); in Client() 230 bio.release(); in Client()
|
D | server.cc | 82 BIO *bio = BIO_new_socket(sock, BIO_CLOSE); in Server() local 84 SSL_set_bio(ssl, bio, bio); in Server()
|
/external/boringssl/src/crypto/cmac/ |
D | cmac_test.cc | 25 ScopedBIO bio(BIO_new_fp(stderr, 0 /* don't close */)); in dump() local 27 BIO_puts(bio.get(), "\nGot:\n"); in dump() 28 BIO_hexdump(bio.get(), got, len, 2 /* indent */); in dump() 29 BIO_puts(bio.get(), "Expected:\n"); in dump() 30 BIO_hexdump(bio.get(), expected, len, 2 /* indent */); in dump() 31 BIO_flush(bio.get()); in dump()
|
/external/boringssl/ |
D | rules.mk | 45 LOCAL_SRC_FILES := $(filter-out src/crypto/bio/connect.c,$(LOCAL_SRC_FILES)) 46 LOCAL_SRC_FILES := $(filter-out src/crypto/bio/fd.c,$(LOCAL_SRC_FILES)) 47 LOCAL_SRC_FILES := $(filter-out src/crypto/bio/file.c,$(LOCAL_SRC_FILES)) 48 LOCAL_SRC_FILES := $(filter-out src/crypto/bio/socket.c,$(LOCAL_SRC_FILES)) 49 LOCAL_SRC_FILES := $(filter-out src/crypto/bio/socket_helper.c,$(LOCAL_SRC_FILES))
|
/external/boringssl/src/crypto/x509/ |
D | pkcs7_test.c | 599 BIO *bio = BIO_new_mem_buf((char *) pem, strlen(pem)); in test_pem_certs() local 602 if (!PKCS7_get_PEM_certificates(certs, bio)) { in test_pem_certs() 614 BIO_free(bio); in test_pem_certs() 621 BIO *bio = BIO_new_mem_buf((char *) pem, strlen(pem)); in test_pem_crls() local 624 if (!PKCS7_get_PEM_CRLs(crls, bio)) { in test_pem_crls() 636 BIO_free(bio); in test_pem_crls()
|
/external/ipsec-tools/src/racoon/ |
D | crypto_openssl.c | 484 BIO *bio = BIO_from_android(CAfile); local 489 if (!bio) { 492 stack = PEM_X509_INFO_read_bio(bio, NULL, NULL, NULL); 493 BIO_free(bio); 803 BIO *bio = NULL; local 813 bio = BIO_new(BIO_s_mem()); 814 if (bio == NULL) 817 error = X509_print(bio, x509); 824 len = BIO_get_mem_data(bio, (char**) &bp); 826 len = BIO_get_mem_data(bio, &bp); [all …]
|
/external/boringssl/src/crypto/pkcs8/ |
D | pkcs12_test.cc | 709 ScopedBIO bio(BIO_new_mem_buf((void*) der, der_len)); in TestCompat() local 710 if (!bio) { in TestCompat() 714 ScopedPKCS12 p12(d2i_PKCS12_bio(bio.get(), nullptr)); in TestCompat()
|
/external/boringssl/src/ssl/ |
D | ssl_lib.c | 628 BIO *bio = NULL; in SSL_set_fd() local 630 bio = BIO_new(BIO_s_fd()); in SSL_set_fd() 632 if (bio == NULL) { in SSL_set_fd() 636 BIO_set_fd(bio, fd, BIO_NOCLOSE); in SSL_set_fd() 637 SSL_set_bio(s, bio, bio); in SSL_set_fd() 646 BIO *bio = NULL; in SSL_set_wfd() local 650 bio = BIO_new(BIO_s_fd()); in SSL_set_wfd() 652 if (bio == NULL) { in SSL_set_wfd() 656 BIO_set_fd(bio, fd, BIO_NOCLOSE); in SSL_set_wfd() 657 SSL_set_bio(s, SSL_get_rbio(s), bio); in SSL_set_wfd() [all …]
|