Skip to content

Commit

Permalink
Merge pull request fullsailor#27 from jpap/oid-cleanup
Browse files Browse the repository at this point in the history
OID cleanup.
  • Loading branch information
mozmark committed Jan 20, 2020
2 parents 3cffc6f + 1b8db54 commit 86d10f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ type signerInfo struct {
Version int `asn1:"default:1"`
IssuerAndSerialNumber issuerAndSerial
DigestAlgorithm pkix.AlgorithmIdentifier
AuthenticatedAttributes []attribute `asn1:"optional,tag:0"`
AuthenticatedAttributes []attribute `asn1:"optional,omitempty,tag:0"`
DigestEncryptionAlgorithm pkix.AlgorithmIdentifier
EncryptedDigest []byte
UnauthenticatedAttributes []attribute `asn1:"optional,tag:1"`
UnauthenticatedAttributes []attribute `asn1:"optional,omitempty,tag:1"`
}

type attribute struct {
Expand Down Expand Up @@ -144,7 +144,7 @@ func (sd *SignedData) AddSignerChain(ee *x509.Certificate, pkey crypto.PrivateKe
attrs := &attributes{}
attrs.Add(OIDAttributeContentType, sd.sd.ContentInfo.ContentType)
attrs.Add(OIDAttributeMessageDigest, sd.messageDigest)
attrs.Add(OIDAttributeSigningTime, time.Now())
attrs.Add(OIDAttributeSigningTime, time.Now().UTC())
for _, attr := range config.ExtraSignedAttributes {
attrs.Add(attr.Type, attr.Value)
}
Expand Down

0 comments on commit 86d10f8

Please sign in to comment.