Files
archy/core/target/debug/deps/librustls_pemfile-b989bdacab76bebd.rmeta
T

58 lines
17 KiB
Plaintext
Raw Normal View History

2026-01-24 22:59:20 +00:00
rust
B#rustc 1.93.0 (254b59607 2026-01-19)Áõ…·fÊ ¦%g--c48c539199cbc88bÁ³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áá\ƒ¦è3$|]åŒ[IÚ tæ-14b12edc9f8cd90bÁë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Áà 9m Ù„«ÐÒþá•cB;-030c5b0bba47cc8fÁrustc_std_workspace_coreÁÛ¹þÓ7>H%¸ÚÉ­-4b81d37a5530864dÁüÃùs<Uß7VyóHr#QÏ-c66cc7807550ce25Á miniz_oxideÁõFÖˆÚ™ª‹"ÞXzLVª-62cbc7af83058505Áadler2Á—wÉD‘嵯|6¨%Œ
+-2f171dd2394b4b62Á hashbrownÁ,ïcV¼¨ø¢:Ê\'È߈-9571ba9e0f6c7a90Árustc_std_workspace_allocÁ%¥Èxµù·¼5Ä3Bœ-aac566ad65903fa4Á
std_detectÁMmáýZ^9õ Îà§e˜÷e-2edb296e590136d8Árustc_demangleÁ@¼§VÉNb˜æ¨fHÌ+V3-53b132e4a2fa6e26Ácfg_ifÁfÝv.Å"ÒÜuPp¹ˆ¶-f76b385d7d4d7f3eÁ addr2lineÁÕú-WiúQVÓ¬
µT§5-fe25100bd73e48e4ÁgimliÁ¹xLáÇí÷‘o±Ñ8£Å-265ba9e6e4f70b3fÁobjectÁÔ³ÝzÓÿ¶ò°öM›¼òü`-9ae0d1f8ea52a318ÁmemchrÁRÎ÷׎™te~QÓ¿ØC\Ò-0bff3c8e8f4e489eÁ  –©HtGNÏ·ˆ!á-d69228d077d46f36Ábase64ÁE¯ö6•§±a#㥛˜--9c9a253673e9c296ÁtestsÁ,ÌàpemfileÁfrom_start_lineÁread_oneÁ read_until_newlineÁ  read_allÁÄENGINEÁcertsÁcrlsÁrsa_private_keysÁpkcs8_private_keysÁec_private_keysÁ½"X509CertificateÁ#
#ì"RSAKeyÁ&
&ì"PKCS8KeyÁ)
)ì"ECKeyÁ,
,ì"CrlÁ/
/ì2Í5Õ








!
3
3
3
6
6
à`"#$Á
%ì&'â
(ì)*ú
+ì,- .ì/0« 1ìrm€³p/â
ž

2"4"5"à`¬âžLÐ- AlphabetÁsymbolsÁÔ¿•ì z9]jüã-TÜã-
Ìã-
º'ô˜.
ôM
TÄÿ-
½`:üÿ-8 ¶.ü³-‹
 œ³-
§"±. ½.ü‰-¶ààGeneralPurposeÁá encode_tableÁòã decode_tableÁòåconfigÁòÝ5œó5ò›t¢-óÝóåõDÑ-êêGeneralPurposeConfigÁëencode_paddingÁòìdecode_allow_trailing_bitsÁòídecode_padding_modeÁòˆÿCš-Á‰Çôõö IndifferentÁ÷øRequireCanonicalÁùú RequireNoneÁ î;JS[¬TóÅ'ŠõCLŠõFUópõ˜Šõ
"$#
.ßAßA­âAbufÁ«<ãA¾ «<µ[<™é•E•EEGlobalÁ Ï€ûkW¬ sœ£
"'#
.Ÿ5<D™
"*#
.Ÿ5<
"-#
.Ÿ5<Ë
"0#
.Ÿ5< !Š DŒ ÒD– ½$ "ioÁÆçüê#¤ # rustls-pemfileÁüQN A basic parser for .pem files containing cryptographic keys and certificates.ÁgËükPM The input to this crate is a .pem file containing potentially many sections,Áü¼OL and the output is those sections as alleged DER-encodings. This crate doesÁüŒ85 not decode the actual DER-encoded keys/certificates.ÁÅË”É ## Quick startÁüÜB? Starting with an `io::BufRead` containing the file to be read:ÁüŸ^[ - Use `read_all()` to ingest the whole file, then work through the contents in-memory, or,ÁüþUR - Use `read_one()` to stream through the file, processing the items as found, or,ÁüÔ^[ - Use `certs()` to extract just the certificates (silently discarding other sections), andÁü³DA similarly for `rsa_private_keys()` and `pkcs8_private_keys()`.ÁøËœü ## Example codeÁ< ```Á”˜ use std::iter;Áü«)& use rustls_pemfile::{Item, read_one};ÁüÕƒ # let mut reader = std::io::BufReader::new(&b"junk\n-----BEGIN RSA PRIVATE KEY-----\nqw\n-----END RSA PRIVATE KEY-----\n"[..]);ÁüÙ:7 // Assume `reader` is any std::io::BufRead implementorÁü”EB for item in iter::from_fn(|| read_one(&mut reader).transpose()) {ÁìÚ match item.unwrap() {ÁüøNK Item::X509Certificate(cert) => println!("certificate {:?}", cert),ÁüÇ QN Item::Crl(crl) => println!("certificate revocation list: {:?}", crl),Áü™
EB Item::RSAKey(key) => println!("rsa pkcs1 key {:?}", key),Áüß
C@ Item::PKCS8Key(key) => println!("pkcs8 key {:?}", key),Áü£ B? Item::ECKey(key) => println!("sec1 ec key {:?}", key),Áüæ ,) _ => println!("unhandled item"),ÁL“ ,  «  !tŠ u Òt ½s"pçÁÄÇ "$ç ErrorKindÁL¥HEngineÁ4Ô.ËÔI 35LÜ
üìC7 7
ÛŸø°ú°û°Ðü°ý°þ°ìHˈXêE>
 

start_lineÁTÿderÁüž Lü•63 Extract and decode the next PEM section from `rd`.ÁÌËüÐEB - Ok(None) is returned if there is no PEM section read from `rd`.Áü– /, - Underlying IO errors produce a `Err(...)`ÁüÆ MJ - Otherwise each decoded section is returned with a `Ok(Some(Item::...))`Á
Ëü˜
@= You can use this function to build an iterator, for example:ÁüÙ
DA `for item in iter::from_fn(|| read_one(rd).transpose()) { ... }`ÁD¥ 8 8õ8ê³í³î³Òï³ìð³ñ³ò³ìäs{©¶Á*  ¡Ñ