Backport to older NSS, which does not have SEC_DerSignDataWithAlgorithmID

This commit is contained in:
Nick Mathewson 2018-09-05 16:49:15 -04:00
parent 5656144290
commit b8a2bdbdc8

View File

@ -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;