Skip to content

Commit

Permalink
Support sha384 RSA signature (google#372)
Browse files Browse the repository at this point in the history
Add signature algorithm details for sha384 RSA signature so certificates
using it can has its signature algorithm properly parsed
  • Loading branch information
whongda authored Apr 15, 2024
1 parent 5455012 commit 0722a49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attributecert/attributecert.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var (
oidSignatureRSASha1 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5}
oidSignatureRSAPSS = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 10}
oidSignatureRSASha256 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11}
oidSignatureRSASha384 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12}
oidSignatureEd25519 = asn1.ObjectIdentifier{1, 3, 101, 112}

oidSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 1}
Expand All @@ -55,6 +56,7 @@ var signatureAlgorithmDetails = []struct {
}{
{x509.SHA1WithRSA, "SHA1-RSA", oidSignatureRSASha1, x509.RSA, crypto.SHA1},
{x509.SHA256WithRSA, "SHA256-RSA", oidSignatureRSASha256, x509.RSA, crypto.SHA256},
{x509.SHA384WithRSA, "SHA384-RSA", oidSignatureRSASha384, x509.RSA, crypto.SHA384},
{x509.SHA256WithRSAPSS, "SHA256-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA256},
{x509.SHA384WithRSAPSS, "SHA384-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA384},
{x509.SHA512WithRSAPSS, "SHA512-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA512},
Expand Down

0 comments on commit 0722a49

Please sign in to comment.