Home
last modified time | relevance | path

Searched refs:der_bytes (Results 1 – 24 of 24) sorted by relevance

/external/python/asn1crypto/docs/
Dpem.md10 - `armor(type_name, der_bytes, headers=None)`
22 der_bytes = f.read()
23 if pem.detect(der_bytes):
24 _, _, der_bytes = pem.unarmor(der_bytes)
44 der_bytes = f.read()
45 if pem.detect(der_bytes):
46 type_name, headers, der_bytes = pem.unarmor(der_bytes)
48 cert = x509.Certificate.load(der_bytes)
59 for type_name, headers, der_bytes in pem.unarmor(f.read(), multiple=True):
60 certs.append(x509.Certificate.load(der_bytes))
[all …]
Duniversal_types.md531 parsed = MyChoice.load(der_bytes)
/external/cronet/net/data/ssl/scripts/
Dcrlsetutil.py79 def _parse_asn1_element(der_bytes): argument
90 tag = six.indexbytes(der_bytes, 0)
91 length = six.indexbytes(der_bytes, 1)
99 length += six.indexbytes(der_bytes, i)
102 contents = der_bytes[:header_length + length]
103 rest = der_bytes[header_length + length:]
141 def _der_cert_to_spki(der_bytes): argument
150 iterator = ASN1Iterator(der_bytes)
186 def der_cert_to_subject_hash(der_bytes): argument
195 iterator = ASN1Iterator(der_bytes)
[all …]
/external/rust/crates/der/src/
Ddocument.rs34 der_bytes: Vec<u8>, field
43 self.der_bytes.as_slice() in as_bytes()
55 self.der_bytes in into_vec()
60 self.der_bytes.clone() in to_vec()
86 let (label, der_bytes) = pem::decode_vec(pem.as_bytes())?; in from_pem()
87 Ok((label, der_bytes.try_into()?)) in from_pem()
158 der_bytes: bytes.into(), in decode()
181 fn try_from(der_bytes: &[u8]) -> Result<Self> { in try_from()
182 Self::from_der(der_bytes) in try_from()
189 fn try_from(der_bytes: Vec<u8>) -> Result<Self> { in try_from()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/pkcs7/
Dpkcs7.c43 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs) { in pkcs7_parse_header() argument
48 *der_bytes = NULL; in pkcs7_parse_header()
49 if (!CBS_asn1_ber_to_der(cbs, &in, der_bytes) || in pkcs7_parse_header()
81 OPENSSL_free(*der_bytes); in pkcs7_parse_header()
82 *der_bytes = NULL; in pkcs7_parse_header()
89 uint8_t *der_bytes = NULL; in PKCS7_get_raw_certificates() local
94 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_raw_certificates()
122 OPENSSL_free(der_bytes); in PKCS7_get_raw_certificates()
Dpkcs7_test.cc473 static void TestCertReparse(const uint8_t *der_bytes, size_t der_len) { in TestCertReparse() argument
482 CBS_init(&pkcs7, der_bytes, der_len); in TestCertReparse()
514 const uint8_t *ptr = der_bytes; in TestCertReparse()
517 EXPECT_EQ(ptr, der_bytes + der_len); in TestCertReparse()
534 EXPECT_EQ(Bytes(der_bytes, der_len), Bytes(result3_data, result3_len)); in TestCertReparse()
558 static void TestCRLReparse(const uint8_t *der_bytes, size_t der_len) { in TestCRLReparse() argument
567 CBS_init(&pkcs7, der_bytes, der_len); in TestCRLReparse()
599 const uint8_t *ptr = der_bytes; in TestCRLReparse()
602 EXPECT_EQ(ptr, der_bytes + der_len); in TestCRLReparse()
Dinternal.h33 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs);
Dpkcs7_x509.c67 uint8_t *der_bytes = NULL; in PKCS7_get_CRLs() local
72 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_CRLs()
117 OPENSSL_free(der_bytes); in PKCS7_get_CRLs()
/external/boringssl/src/crypto/pkcs7/
Dpkcs7.c43 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs) { in pkcs7_parse_header() argument
48 *der_bytes = NULL; in pkcs7_parse_header()
49 if (!CBS_asn1_ber_to_der(cbs, &in, der_bytes) || in pkcs7_parse_header()
81 OPENSSL_free(*der_bytes); in pkcs7_parse_header()
82 *der_bytes = NULL; in pkcs7_parse_header()
89 uint8_t *der_bytes = NULL; in PKCS7_get_raw_certificates() local
94 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_raw_certificates()
122 OPENSSL_free(der_bytes); in PKCS7_get_raw_certificates()
Dpkcs7_test.cc473 static void TestCertReparse(const uint8_t *der_bytes, size_t der_len) { in TestCertReparse() argument
482 CBS_init(&pkcs7, der_bytes, der_len); in TestCertReparse()
514 const uint8_t *ptr = der_bytes; in TestCertReparse()
517 EXPECT_EQ(ptr, der_bytes + der_len); in TestCertReparse()
534 EXPECT_EQ(Bytes(der_bytes, der_len), Bytes(result3_data, result3_len)); in TestCertReparse()
558 static void TestCRLReparse(const uint8_t *der_bytes, size_t der_len) { in TestCRLReparse() argument
567 CBS_init(&pkcs7, der_bytes, der_len); in TestCRLReparse()
599 const uint8_t *ptr = der_bytes; in TestCRLReparse()
602 EXPECT_EQ(ptr, der_bytes + der_len); in TestCRLReparse()
Dinternal.h33 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs);
Dpkcs7_x509.c68 uint8_t *der_bytes = NULL; in PKCS7_get_CRLs() local
73 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_CRLs()
118 OPENSSL_free(der_bytes); in PKCS7_get_CRLs()
/external/cronet/third_party/boringssl/src/crypto/pkcs7/
Dpkcs7.c43 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs) { in pkcs7_parse_header() argument
48 *der_bytes = NULL; in pkcs7_parse_header()
49 if (!CBS_asn1_ber_to_der(cbs, &in, der_bytes) || in pkcs7_parse_header()
81 OPENSSL_free(*der_bytes); in pkcs7_parse_header()
82 *der_bytes = NULL; in pkcs7_parse_header()
89 uint8_t *der_bytes = NULL; in PKCS7_get_raw_certificates() local
94 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_raw_certificates()
122 OPENSSL_free(der_bytes); in PKCS7_get_raw_certificates()
Dpkcs7_test.cc473 static void TestCertReparse(const uint8_t *der_bytes, size_t der_len) { in TestCertReparse() argument
482 CBS_init(&pkcs7, der_bytes, der_len); in TestCertReparse()
514 const uint8_t *ptr = der_bytes; in TestCertReparse()
517 EXPECT_EQ(ptr, der_bytes + der_len); in TestCertReparse()
534 EXPECT_EQ(Bytes(der_bytes, der_len), Bytes(result3_data, result3_len)); in TestCertReparse()
558 static void TestCRLReparse(const uint8_t *der_bytes, size_t der_len) { in TestCRLReparse() argument
567 CBS_init(&pkcs7, der_bytes, der_len); in TestCRLReparse()
599 const uint8_t *ptr = der_bytes; in TestCRLReparse()
602 EXPECT_EQ(ptr, der_bytes + der_len); in TestCRLReparse()
Dinternal.h33 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs);
Dpkcs7_x509.c68 uint8_t *der_bytes = NULL; in PKCS7_get_CRLs() local
73 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_CRLs()
118 OPENSSL_free(der_bytes); in PKCS7_get_CRLs()
/external/python/asn1crypto/asn1crypto/
Dpem.py50 def armor(type_name, der_bytes, headers=None): argument
70 if not isinstance(der_bytes, byte_cls):
74 ''' % _type_name(der_bytes)
98 b64_bytes = base64.b64encode(der_bytes)
174 der_bytes = base64.b64decode(base64_data)
176 yield (object_type, headers, der_bytes)
/external/rust/crates/spki/src/
Dfingerprint.rs39 fn write(&mut self, der_bytes: &[u8]) -> der::Result<()> { in write()
40 self.digest.update(der_bytes); in write()
/external/python/asn1crypto/tests/
Dtest_core.py378 def integer(self, native, der_bytes): argument
380 self.assertEqual(der_bytes, i.dump())
381 self.assertEqual(native, core.Integer.load(der_bytes).native)
394 def utctime(self, native, der_bytes): argument
396 self.assertEqual(der_bytes, u.dump())
397 self.assertEqual(native, core.UTCTime.load(der_bytes).native)
452 def generalized_time(self, ber_bytes, native, der_bytes): argument
458 if der_bytes is not None:
460 self.assertEqual(encoded, der_bytes)
508 def bit_string(self, native, der_bytes): argument
[all …]
Dtest_pem.py131 for name, headers, der_bytes in pem.unarmor(input_data, True):
134 self.assertEqual(der_data[i], der_bytes)
Dtest_x509.py112 def ip_address(self, unicode_string, der_bytes): argument
113 self.assertEqual(der_bytes, x509.IPAddress(unicode_string).dump())
114 self.assertEqual(unicode_string, x509.IPAddress.load(der_bytes).native)
/external/cronet/net/tools/
Dprint_certificates.py96 def extract_certificates_from_der_pkcs7(der_bytes): argument
98 ['openssl','pkcs7','-print_certs', '-inform', 'DER'], der_bytes)
120 der_bytes = process_data_with_command(["ascii2der"], der_ascii_bytes)
121 if der_bytes:
122 certificates_der.append(der_bytes)
/external/rust/crates/der/tests/
Dset_of.rs54 …let der_bytes = hex!("3139301906035504030C12546573742055736572393031353734333830301C060A0992268993… in ordering_regression() localVariable
55 let set = SetOf::<AttributeTypeAndValue<'_>, 3>::from_der(&der_bytes).unwrap(); in ordering_regression()
Ddatetime.rs36 let der_bytes = encoder.finish().unwrap(); localVariable
38 let utc_time2 = UtcTime::from_der(der_bytes).unwrap();