aboutsummaryrefslogtreecommitdiff
path: root/p2p/src
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2023-12-12 11:08:12 +0300
committerhozan23 <hozan23@proton.me>2023-12-12 11:08:12 +0300
commita16997d75acf57b0be813716d0d4e7cfbc333f58 (patch)
treeaa0509466ac6f55d2c2cec810423b7237df3251d /p2p/src
parent3a800cd40c3c034b9343ea8d31c62ea5b98560f8 (diff)
p2p/tls_config: minor change
Diffstat (limited to 'p2p/src')
-rw-r--r--p2p/src/tls_config.rs4
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 ???