Skip to content

Commit

Permalink
Remove sha1 digest algorithm identifier from the accepted prefixes fo…
Browse files Browse the repository at this point in the history
…r RSA-PKCS
  • Loading branch information
mwielgoszewski authored and ericchiang committed Oct 24, 2022
1 parent b03ae6f commit 9e4ed31
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion p11kit/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func signECDSA(priv crypto.Signer, m mechanism, data []byte) ([]byte, error) {
// precompute a prefix of the digest value that makes a valid ASN1 DER string
// with the correct contents.
var hashPrefixes = map[crypto.Hash][]byte{
crypto.SHA1: {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14},
crypto.SHA224: {0x30, 0x2d, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, 0x05, 0x00, 0x04, 0x1c},
crypto.SHA256: {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20},
crypto.SHA384: {0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30},
Expand Down

0 comments on commit 9e4ed31

Please sign in to comment.