mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Backport to older NSS, which does not have SEC_DerSignDataWithAlgorithmID
This commit is contained in:
parent
5656144290
commit
b8a2bdbdc8
@ -114,11 +114,19 @@ tor_tls_create_certificate_internal(crypto_pk_t *rsa,
|
|||||||
if (!tmp)
|
if (!tmp)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
#if 0
|
||||||
s = SEC_DerSignDataWithAlgorithmID(cert->arena,
|
s = SEC_DerSignDataWithAlgorithmID(cert->arena,
|
||||||
&signed_der,
|
&signed_der,
|
||||||
der.data, der.len,
|
der.data, der.len,
|
||||||
(SECKEYPrivateKey *)signing_key,//const
|
(SECKEYPrivateKey *)signing_key,//const
|
||||||
&cert->signature);
|
&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)
|
if (s != SECSuccess)
|
||||||
goto err;
|
goto err;
|
||||||
|
Loading…
Reference in New Issue
Block a user