Browse Source

fix asan (#275)

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
pull/277/head
Ruslan Tushov 4 weeks ago
committed by GitHub
parent
commit
ac6543cb2f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/security/tls/tls_details.cpp

2
src/security/tls/tls_details.cpp

@ -208,10 +208,10 @@ namespace libp2p::security::tls_details {
}
ASN1_INTEGER *rand_int = ASN1_INTEGER_new();
CLEANUP_PTR(rand_int, ASN1_INTEGER_free);
BN_to_ASN1_INTEGER(bn, rand_int);
if (X509_set_serialNumber(cert, rand_int) == 0) {
ASN1_INTEGER_free(rand_int);
throw std::runtime_error("cannot add SN to certificate");
}
}

Loading…
Cancel
Save