Skip to content

Commit

Permalink
Merge pull request #10 from kpp/tls_docs
Browse files Browse the repository at this point in the history
Fix tls docs according to specs
  • Loading branch information
kpp authored Aug 3, 2021
2 parents 91288ba + 5220d73 commit 337fea9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transports/tls-quic/src/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub fn make_certificate(
// into the SignedKey data structure, which is carried
// in the libp2p Public Key Extension.
// SignedKey ::= SEQUENCE {
// publicKey BIT STRING,
// signature BIT STRING
// publicKey OCTET STRING,
// signature OCTET STRING
// }
let extension_content = {
let serialized_pubkey = keypair.public().into_protobuf_encoding();
Expand Down Expand Up @@ -145,8 +145,8 @@ pub fn parse_certificate(der_input: &[u8]) -> Result<P2pCertificate, X509Error>
// into the SignedKey data structure, which is carried
// in the libp2p Public Key Extension.
// SignedKey ::= SEQUENCE {
// publicKey BIT STRING,
// signature BIT STRING
// publicKey OCTET STRING,
// signature OCTET STRING
// }
let (public_key, signature): (Vec<u8>, Vec<u8>) = yasna::decode_der(ext.value)
.map_err(|_| X509Error::InvalidUserCertificate)?;
Expand Down

0 comments on commit 337fea9

Please sign in to comment.