Skip to content

Commit

Permalink
p7中修改sm3withsm2标识
Browse files Browse the repository at this point in the history
  • Loading branch information
czdsdo committed Mar 20, 2020
1 parent ce7d086 commit 2d54c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sm2/pkcs7.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
oidAttributeContentType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 3}
oidAttributeMessageDigest = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 4}
oidAttributeSigningTime = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 5}

oidSM3withSM2=asn1.ObjectIdentifier{1, 2, 156, 10197, 1, 501}
oidDSASM2 = asn1.ObjectIdentifier{1, 2, 156, 10197, 1, 301, 1}
)

Expand Down Expand Up @@ -268,7 +268,7 @@ func getSignatureAlgorithmByHash(hash Hash, oid asn1.ObjectIdentifier) Signature
switch hash {
case SM3:
switch {
case oid.Equal(oidDSASM2):
case oid.Equal(oidSM3withSM2):
return SM2WithSM3
}
case SHA256:
Expand Down

0 comments on commit 2d54c72

Please sign in to comment.