Home
last modified time | relevance | path

Searched refs:bio (Results 1 – 25 of 149) sorted by relevance

123456

/external/pdfium/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/
Dbio.c51 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 (bio->bp >= 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 …]
Dbio.h81 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);
/external/chromium_org/third_party/openssl/openssl/crypto/bio/
Dbio_lib.c84 int BIO_set(BIO *bio, BIO_METHOD *method) in BIO_set() argument
86 bio->method=method; in BIO_set()
87 bio->callback=NULL; in BIO_set()
88 bio->cb_arg=NULL; in BIO_set()
89 bio->init=0; in BIO_set()
90 bio->shutdown=1; in BIO_set()
91 bio->flags=0; in BIO_set()
92 bio->retry_reason=0; in BIO_set()
93 bio->num=0; in BIO_set()
94 bio->ptr=NULL; in BIO_set()
[all …]
Dbss_bio.c96 static int bio_new(BIO *bio);
97 static int bio_free(BIO *bio);
98 static int bio_read(BIO *bio, char *buf, int size);
99 static int bio_write(BIO *bio, const char *buf, int num);
100 static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr);
101 static int bio_puts(BIO *bio, const char *str);
104 static void bio_destroy_pair(BIO *bio);
145 static int bio_new(BIO *bio) in bio_new() argument
157 bio->ptr = b; in bio_new()
162 static int bio_free(BIO *bio) in bio_free() argument
[all …]
Dbio_cb.c66 long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp, in BIO_debug_callback() argument
78 BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); in BIO_debug_callback()
84 BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); in BIO_debug_callback()
87 if (bio->method->type & BIO_TYPE_DESCRIPTOR) in BIO_debug_callback()
89 bio->num,(unsigned long)argi, in BIO_debug_callback()
90 bio->method->name,bio->num); in BIO_debug_callback()
93 bio->num,(unsigned long)argi, in BIO_debug_callback()
94 bio->method->name); in BIO_debug_callback()
97 if (bio->method->type & BIO_TYPE_DESCRIPTOR) in BIO_debug_callback()
99 bio->num,(unsigned long)argi, in BIO_debug_callback()
[all …]
Dbss_acpt.c168 static void acpt_close_socket(BIO *bio) in acpt_close_socket() argument
172 c=(BIO_ACCEPT *)bio->ptr; in acpt_close_socket()
178 bio->num=INVALID_SOCKET; in acpt_close_socket()
202 BIO *bio=NULL,*dbio; in acpt_state() local
253 bio=BIO_new_socket(i,BIO_CLOSE); in acpt_state()
254 if (bio == NULL) goto err; in acpt_state()
256 BIO_set_callback(bio,BIO_get_callback(b)); in acpt_state()
257 BIO_set_callback_arg(bio,BIO_get_callback_arg(b)); in acpt_state()
274 if (!BIO_push(dbio,bio)) goto err; in acpt_state()
275 bio=dbio; in acpt_state()
[all …]
/external/openssl/crypto/bio/
Dbio_lib.c84 int BIO_set(BIO *bio, BIO_METHOD *method) in BIO_set() argument
86 bio->method=method; in BIO_set()
87 bio->callback=NULL; in BIO_set()
88 bio->cb_arg=NULL; in BIO_set()
89 bio->init=0; in BIO_set()
90 bio->shutdown=1; in BIO_set()
91 bio->flags=0; in BIO_set()
92 bio->retry_reason=0; in BIO_set()
93 bio->num=0; in BIO_set()
94 bio->ptr=NULL; in BIO_set()
[all …]
Dbss_bio.c96 static int bio_new(BIO *bio);
97 static int bio_free(BIO *bio);
98 static int bio_read(BIO *bio, char *buf, int size);
99 static int bio_write(BIO *bio, const char *buf, int num);
100 static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr);
101 static int bio_puts(BIO *bio, const char *str);
104 static void bio_destroy_pair(BIO *bio);
145 static int bio_new(BIO *bio) in bio_new() argument
157 bio->ptr = b; in bio_new()
162 static int bio_free(BIO *bio) in bio_free() argument
[all …]
Dbio_cb.c66 long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp, in BIO_debug_callback() argument
78 BIO_snprintf(buf,sizeof buf,"BIO[%08lX]:",(unsigned long)bio); in BIO_debug_callback()
84 BIO_snprintf(p,p_maxlen,"Free - %s\n",bio->method->name); in BIO_debug_callback()
87 if (bio->method->type & BIO_TYPE_DESCRIPTOR) in BIO_debug_callback()
89 bio->num,(unsigned long)argi, in BIO_debug_callback()
90 bio->method->name,bio->num); in BIO_debug_callback()
93 bio->num,(unsigned long)argi, in BIO_debug_callback()
94 bio->method->name); in BIO_debug_callback()
97 if (bio->method->type & BIO_TYPE_DESCRIPTOR) in BIO_debug_callback()
99 bio->num,(unsigned long)argi, in BIO_debug_callback()
[all …]
Dbss_acpt.c168 static void acpt_close_socket(BIO *bio) in acpt_close_socket() argument
172 c=(BIO_ACCEPT *)bio->ptr; in acpt_close_socket()
178 bio->num=INVALID_SOCKET; in acpt_close_socket()
202 BIO *bio=NULL,*dbio; in acpt_state() local
253 bio=BIO_new_socket(i,BIO_CLOSE); in acpt_state()
254 if (bio == NULL) goto err; in acpt_state()
256 BIO_set_callback(bio,BIO_get_callback(b)); in acpt_state()
257 BIO_set_callback_arg(bio,BIO_get_callback_arg(b)); in acpt_state()
274 if (!BIO_push(dbio,bio)) goto err; in acpt_state()
275 bio=dbio; in acpt_state()
[all …]
/external/chromium_org/crypto/
Dopenssl_bio_string.cc14 int bio_string_write(BIO* bio, const char* data, int len) { in bio_string_write() argument
15 reinterpret_cast<std::string*>(bio->ptr)->append(data, len); in bio_string_write()
19 int bio_string_puts(BIO* bio, const char* data) { in bio_string_puts() argument
21 return bio_string_write(bio, data, strlen(data)); in bio_string_puts()
24 long bio_string_ctrl(BIO* bio, int cmd, long num, void* ptr) { in bio_string_ctrl() argument
25 std::string* str = reinterpret_cast<std::string*>(bio->ptr); in bio_string_ctrl()
41 int bio_string_new(BIO* bio) { in bio_string_new() argument
42 bio->ptr = NULL; in bio_string_new()
43 bio->init = 0; in bio_string_new()
47 int bio_string_free(BIO* bio) { in bio_string_free() argument
[all …]
Dopenssl_bio_string_unittest.cc18 crypto::ScopedOpenSSL<BIO, BIO_free_all> bio(crypto::BIO_new_string(&s)); in TEST() local
19 ASSERT_TRUE(bio.get()); in TEST()
22 BIO_printf(bio.get(), "a %s\nb %i\n", "one", 2)); in TEST()
24 EXPECT_EQ(static_cast<int>(expected1.size()), BIO_tell(bio.get())); in TEST()
26 EXPECT_EQ(1, BIO_flush(bio.get())); in TEST()
27 EXPECT_EQ(-1, BIO_seek(bio.get(), 0)); in TEST()
31 BIO_write(bio.get(), expected2.data(), expected2.size())); in TEST()
34 BIO_tell(bio.get())); in TEST()
37 BIO_puts(bio.get(), expected3.c_str())); in TEST()
41 BIO_tell(bio.get())); in TEST()
[all …]
Dec_private_key_openssl.cc25 typedef int (*ExportBioFunction)(BIO* bio, const void* key);
34 ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new(BIO_s_mem())); in ExportKeyWithBio() local
35 if (!bio.get()) in ExportKeyWithBio()
38 if (!export_fn(bio.get(), key)) in ExportKeyWithBio()
42 long len = BIO_get_mem_data(bio.get(), &data); in ExportKeyWithBio()
120 ScopedOpenSSL<BIO, BIO_free_all> bio( in CreateFromEncryptedPrivateKeyInfo() local
122 if (!bio.get()) in CreateFromEncryptedPrivateKeyInfo()
127 d2i_PKCS8_bio(bio.get(), NULL)); in CreateFromEncryptedPrivateKeyInfo()
Drsa_private_key_openssl.cc32 ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new(BIO_s_mem())); in ExportKey() local
34 int res = export_fn(bio.get(), key); in ExportKey()
39 long len = BIO_get_mem_data(bio.get(), &data); in ExportKey()
78 ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new_mem_buf(data, input.size())); in CreateFromPrivateKeyInfo() local
79 if (!bio.get()) in CreateFromPrivateKeyInfo()
86 d2i_PKCS8_PRIV_KEY_INFO_bio(bio.get(), NULL)); in CreateFromPrivateKeyInfo()
/external/google-tv-pairing-protocol/cpp/src/polo/util/
Dcertificateutil.cc25 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/openssl/crypto/asn1/
Dasn_mime.c97 static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio);
104 static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret);
121 BIO *bio, *tbio; in i2d_ASN1_bio_stream() local
122 bio = BIO_new_NDEF(out, val, it); in i2d_ASN1_bio_stream()
123 if (!bio) in i2d_ASN1_bio_stream()
128 SMIME_crlf_copy(in, bio, flags); in i2d_ASN1_bio_stream()
129 (void)BIO_flush(bio); in i2d_ASN1_bio_stream()
133 tbio = BIO_pop(bio); in i2d_ASN1_bio_stream()
134 BIO_free(bio); in i2d_ASN1_bio_stream()
135 bio = tbio; in i2d_ASN1_bio_stream()
[all …]
/external/chromium_org/third_party/openssl/openssl/crypto/asn1/
Dasn_mime.c97 static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio);
104 static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret);
121 BIO *bio, *tbio; in i2d_ASN1_bio_stream() local
122 bio = BIO_new_NDEF(out, val, it); in i2d_ASN1_bio_stream()
123 if (!bio) in i2d_ASN1_bio_stream()
128 SMIME_crlf_copy(in, bio, flags); in i2d_ASN1_bio_stream()
129 (void)BIO_flush(bio); in i2d_ASN1_bio_stream()
133 tbio = BIO_pop(bio); in i2d_ASN1_bio_stream()
134 BIO_free(bio); in i2d_ASN1_bio_stream()
135 bio = tbio; in i2d_ASN1_bio_stream()
[all …]
/external/chromium_org/third_party/webrtc/base/
Dopensslidentity.cc197 BIO* bio = BIO_new_mem_buf(const_cast<char*>(pem_string.c_str()), -1); in FromPEMString() local
198 if (!bio) in FromPEMString()
200 BIO_set_mem_eof_return(bio, 0); in FromPEMString()
201 X509 *x509 = PEM_read_bio_X509(bio, NULL, NULL, in FromPEMString()
203 BIO_free(bio); // Frees the BIO, but not the pointed-to string. in FromPEMString()
254 BIO* bio = BIO_new(BIO_s_mem()); in ToPEMString() local
255 if (!bio) { in ToPEMString()
259 if (!PEM_write_bio_X509(bio, x509_)) { in ToPEMString()
260 BIO_free(bio); in ToPEMString()
264 BIO_write(bio, "\0", 1); in ToPEMString()
[all …]
/external/chromium_org/third_party/libjingle/source/talk/base/
Dopensslidentity.cc214 BIO* bio = BIO_new_mem_buf(const_cast<char*>(pem_string.c_str()), -1); in FromPEMString() local
215 if (!bio) in FromPEMString()
217 BIO_set_mem_eof_return(bio, 0); in FromPEMString()
218 X509 *x509 = PEM_read_bio_X509(bio, NULL, NULL, in FromPEMString()
220 BIO_free(bio); // Frees the BIO, but not the pointed-to string. in FromPEMString()
271 BIO* bio = BIO_new(BIO_s_mem()); in ToPEMString() local
272 if (!bio) { in ToPEMString()
276 if (!PEM_write_bio_X509(bio, x509_)) { in ToPEMString()
277 BIO_free(bio); in ToPEMString()
281 BIO_write(bio, "\0", 1); in ToPEMString()
[all …]
/external/chromium_org/third_party/tlslite/tlslite/utils/
Dopenssl_rsakey.py76 bio = m2.bio_new(m2.bio_s_mem())
80 m2.rsa_write_key(self.rsa, bio, m2.des_ede_cbc(), f)
83 m2.rsa_write_key_no_cipher(self.rsa, bio, f)
87 m2.rsa_write_pub_key(self.rsa, bio)
88 s = m2.bio_read(bio, m2.bio_ctrl_pending(bio))
89 m2.bio_free(bio)
113 bio = m2.bio_new(m2.bio_s_mem())
115 m2.bio_write(bio, s)
119 key.rsa = m2.rsa_read_key(bio, callback)
124 key.rsa = m2.rsa_read_pub_key(bio)
[all …]
/external/chromium_org/third_party/openssl/openssl/crypto/pkcs7/
Dpk7_doit.c263 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) in PKCS7_dataInit() argument
377 if (bio == NULL) in PKCS7_dataInit()
380 bio=BIO_new(BIO_s_null()); in PKCS7_dataInit()
382 bio = BIO_new_mem_buf(os->data, os->length); in PKCS7_dataInit()
383 if(bio == NULL) in PKCS7_dataInit()
385 bio=BIO_new(BIO_s_mem()); in PKCS7_dataInit()
386 if (bio == NULL) in PKCS7_dataInit()
388 BIO_set_mem_eof_return(bio,0); in PKCS7_dataInit()
392 BIO_push(out,bio); in PKCS7_dataInit()
394 out = bio; in PKCS7_dataInit()
[all …]
/external/openssl/crypto/pkcs7/
Dpk7_doit.c263 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio) in PKCS7_dataInit() argument
377 if (bio == NULL) in PKCS7_dataInit()
380 bio=BIO_new(BIO_s_null()); in PKCS7_dataInit()
382 bio = BIO_new_mem_buf(os->data, os->length); in PKCS7_dataInit()
383 if(bio == NULL) in PKCS7_dataInit()
385 bio=BIO_new(BIO_s_mem()); in PKCS7_dataInit()
386 if (bio == NULL) in PKCS7_dataInit()
388 BIO_set_mem_eof_return(bio,0); in PKCS7_dataInit()
392 BIO_push(out,bio); in PKCS7_dataInit()
394 out = bio; in PKCS7_dataInit()
[all …]
/external/chromium_org/third_party/openssl/openssl/apps/
Ds_cb.c281 long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, in bio_dump_callback() argument
286 out=(BIO *)BIO_get_callback_arg(bio); in bio_dump_callback()
292 (void *)bio,argp,(unsigned long)argi,ret,ret); in bio_dump_callback()
299 (void *)bio,argp,(unsigned long)argi,ret,ret); in bio_dump_callback()
344 BIO *bio = arg; in msg_cb() local
633 …BIO_printf(bio, "%s %s%s [length %04lx]%s%s\n", str_write_p, str_version, str_content_type, (unsig… in msg_cb()
639 BIO_printf(bio, " "); in msg_cb()
648 BIO_printf(bio, "\n "); in msg_cb()
649 BIO_printf(bio, " %02x", ((const unsigned char*)buf)[i]); in msg_cb()
652 BIO_printf(bio, " ..."); in msg_cb()
[all …]
/external/openssl/apps/
Ds_cb.c281 long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp, in bio_dump_callback() argument
286 out=(BIO *)BIO_get_callback_arg(bio); in bio_dump_callback()
292 (void *)bio,argp,(unsigned long)argi,ret,ret); in bio_dump_callback()
299 (void *)bio,argp,(unsigned long)argi,ret,ret); in bio_dump_callback()
344 BIO *bio = arg; in msg_cb() local
633 …BIO_printf(bio, "%s %s%s [length %04lx]%s%s\n", str_write_p, str_version, str_content_type, (unsig… in msg_cb()
639 BIO_printf(bio, " "); in msg_cb()
648 BIO_printf(bio, "\n "); in msg_cb()
649 BIO_printf(bio, " %02x", ((const unsigned char*)buf)[i]); in msg_cb()
652 BIO_printf(bio, " ..."); in msg_cb()
[all …]
Ds_client.c1977 static void print_stuff(BIO *bio, SSL *s, int full) in print_stuff() argument
2002 BIO_printf(bio,"---\nCertificate chain\n"); in print_stuff()
2007 BIO_printf(bio,"%2d s:%s\n",i,buf); in print_stuff()
2010 BIO_printf(bio," i:%s\n",buf); in print_stuff()
2012 PEM_write_bio_X509(bio,sk_X509_value(sk,i)); in print_stuff()
2016 BIO_printf(bio,"---\n"); in print_stuff()
2020 BIO_printf(bio,"Server certificate\n"); in print_stuff()
2022 PEM_write_bio_X509(bio,peer); in print_stuff()
2025 BIO_printf(bio,"subject=%s\n",buf); in print_stuff()
2028 BIO_printf(bio,"issuer=%s\n",buf); in print_stuff()
[all …]

123456