aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-05 16:49:15 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-05 16:49:15 -0400
commitb8a2bdbdc8c467762f1bb0c2d103c566fe9703a7 (patch)
treede92437cc8e2d2ff8b4986c2bd4151975fd982e7 /src/lib/tls
parent5656144290754254f2b10dfc941a652c4c2ba1e4 (diff)
downloadtor-b8a2bdbdc8c467762f1bb0c2d103c566fe9703a7.tar.gz
tor-b8a2bdbdc8c467762f1bb0c2d103c566fe9703a7.zip
Backport to older NSS, which does not have SEC_DerSignDataWithAlgorithmID
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/x509_nss.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/tls/x509_nss.c b/src/lib/tls/x509_nss.c
index 5bb7940c90..a0a9c559cf 100644
--- a/src/lib/tls/x509_nss.c
+++ b/src/lib/tls/x509_nss.c
@@ -114,11 +114,19 @@ tor_tls_create_certificate_internal(crypto_pk_t *rsa,
if (!tmp)
goto err;
+#if 0
s = SEC_DerSignDataWithAlgorithmID(cert->arena,
&signed_der,
der.data, der.len,
(SECKEYPrivateKey *)signing_key,//const
&cert->signature);
+#else
+ s = SEC_DerSignData(cert->arena,
+ &signed_der,
+ der.data, der.len,
+ (SECKEYPrivateKey *)signing_key,//const
+ SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION);
+#endif
if (s != SECSuccess)
goto err;