diff options
author | hozan23 <hozan23@proton.me> | 2023-12-12 11:08:12 +0300 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2023-12-12 11:08:12 +0300 |
commit | a16997d75acf57b0be813716d0d4e7cfbc333f58 (patch) | |
tree | aa0509466ac6f55d2c2cec810423b7237df3251d | |
parent | 3a800cd40c3c034b9343ea8d31c62ea5b98560f8 (diff) |
p2p/tls_config: minor change
-rw-r--r-- | p2p/src/tls_config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/p2p/src/tls_config.rs b/p2p/src/tls_config.rs index 9fe64f5..ebb12f4 100644 --- a/p2p/src/tls_config.rs +++ b/p2p/src/tls_config.rs @@ -58,8 +58,8 @@ fn generate_cert(key_pair: &KeyPair) -> Result<(Certificate, PrivateKey)> { let private_key = rustls::PrivateKey(cert_key_pair.serialize_der()); // Add a custom extension to the certificate: - // - Sign the certificate's public key with the provided key pair's public key - // - Append both the signature and the key pair's public key to the extension + // - Sign the certificate's public key with the provided key pair's private key + // - Append both the computed signature and the key pair's public key to the extension let signature = key_pair.sign(&cert_key_pair.public_key_der()); let ext_content = yasna::encode_der(&(key_pair.public().as_bytes().to_vec(), signature)); // XXX: Not sure about the oid number ??? |