diff --git a/go.mod b/go.mod index c3073f2..97124dd 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/wja-id/pkcs7 go 1.11 + +require golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect diff --git a/go.sum b/go.sum index 56cc345..fdd972f 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,10 @@ github.com/wja-id/globalsign-sdk v0.0.0-20201216095649-1d80c2fe9367 h1:eA5o6oaV/Mw+cISBLVbC8gEP78DGRJfUrPtlr82ofVY= github.com/wja-id/globalsign-sdk v0.0.0-20201216095649-1d80c2fe9367/go.mod h1:UjFOzSB3clBO1R7ulqrE2Bw3U2w3nC/WhV1nnRSIZDg= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e h1:gsTQYXdTw2Gq7RBsWvlQ91b+aEQ6bXFUngBGuR8sPpI= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/ocsp.go b/ocsp.go new file mode 100644 index 0000000..1fb3376 --- /dev/null +++ b/ocsp.go @@ -0,0 +1,9 @@ +package pkcs7 + +import "encoding/asn1" + +type RevocationInfoArchival struct { + Crl []asn1.RawValue `asn1:"explicit,tag:0,optional"` + Ocsp []asn1.RawValue `asn1:"explicit,tag:1,optional"` + OtherRevInfo []asn1.RawValue `asn1:"explicit,tag:2,optional"` +} diff --git a/sign.go b/sign.go index c3e033d..496e2b2 100644 --- a/sign.go +++ b/sign.go @@ -14,7 +14,6 @@ import ( "io/ioutil" "math/big" "net/http" - "time" ) // SignedData is an opaque data structure for creating signed data payloads @@ -212,7 +211,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()) // add id-aa-signing-certificate-v2 if b, err := populateSigningCertificateV2(ee); err == nil { @@ -360,6 +359,25 @@ func (si *signerInfo) SetUnauthenticatedAttributes(extraUnsignedAttrs []Attribut return nil } +type TimestampTokenRequestCallback func(digest []byte) ([]byte, error) + +func (sd *SignedData) RequestSignerTimestampToken(signerID int, callback TimestampTokenRequestCallback) error { + if len(sd.sd.SignerInfos) < (signerID + 1) { + return fmt.Errorf("no signer information found for ID %d", signerID) + } + + if callback == nil { + return fmt.Errorf("no callback defined") + } + + tst, err := callback(sd.messageDigest) + if err != nil { + return err + } + + return sd.AddTimestampTokenToSigner(signerID, tst) +} + // AddTimestampTokenToSigner inserts TimestampToken which described in RFC3161 into // unauthenticated attribute of that signer func (sd *SignedData) AddTimestampTokenToSigner(signerID int, tst []byte) (err error) { diff --git a/sign_test.go b/sign_test.go index 0e4e8ae..81a751f 100644 --- a/sign_test.go +++ b/sign_test.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/dsa" "crypto/x509" + "crypto/x509/pkix" "encoding/asn1" "encoding/base64" "encoding/pem" @@ -14,6 +15,8 @@ import ( "os" "os/exec" "testing" + + "golang.org/x/crypto/ocsp" ) func TestSign(t *testing.T) { @@ -298,13 +301,13 @@ func fromHex(s string) *big.Int { func TestUnmarshal(t *testing.T) { t.Log("itext") - testUnmarshal(t, `MIIYZgYJKoZIhvcNAQcCoIIYVzCCGFMCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGggggMMIIDbjCCAlagAwIBAgIOSETcwm+2g5xjwYbw8ikwDQYJKoZIhvcNAQELBQAwUjELMAkGA1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExKDAmBgNVBAMTH0dsb2JhbFNpZ24gTm9uLVB1YmxpYyBIVkNBIERlbW8wHhcNMTYwNzIwMDAwMDAwWhcNMjYwNzIwMDAwMDAwWjBSMQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEoMCYGA1UEAxMfR2xvYmFsU2lnbiBOb24tUHVibGljIEhWQ0EgRGVtbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZr0Una3n3CTWMf+TGoc3sFXqWIpAasR2ULxVuziCQVs7Z2/ha6iNhQ2JITZzTu5ZZHwrgvxTwdLSq7Y9H22u1sahJYMElQOsoEMERwGKGU92HpqxrinYi54mZ0xU1vYVyMAPfOvOh9NUgoKXCuza27wIfl00A7HO8nq0hoYxmezrVIUyObLuQir43mwruov31nOhFeYqxNWPkQVDGOBqRGp6KkEMlKsV9/Tyw0JyRko1cDukS6Oacv1NSU4rz6+aYqvCQSZEy5IbUdKS46aQ1FO9c4jVhJ3uTzJ/nJ5W4B9RP//JpLt2ey9XvfvuJW8s9qjJtY18frgCoDyilhHk0CAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFGdLB+kJ8fF7Msy9hRxOJw3OocxsMA0GCSqGSIb3DQEBCwUA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iYWxTaWduIENBIGZvciBBQVRMIC0gU0hBMzg0IC0gRzQCDBY3rh3n8PFUx5DeoDANBgkqhkiG9w0BAQsFAASCAQAjk6nw5SEPT+8XR6Tlp1/kYr/5nKmpTeJQeeFa/4nj+tszW6mjPf3Fbjjh2+BpYyhMcTPoEB18HkNh8Pjt1XCPgagt5iolD57qK17daQHYI3y3rm4+TGAZn+Gq8U+OUrqBk3G5efySAeaBJzfXuMg/FTB8JD2fEInGAqF78mR2i/gNGBeKOJWCkiuD+WuhJFjuC+9rIhb0BxhEMouugfGR0dKQQFDSYs0FSmoIy0QkkaQBe41NCrcf8P8rasgdXSgmh30EGZ+y4jqaaZGHbL242mF+SqLM9I9mX1IcY4oZioqmf0eAEVQ2vnwsSFYuy9oXcIS7WNEOFbKT+PlrLdKb`) } func testUnmarshal(t *testing.T, sig string) { @@ -330,22 +333,28 @@ func testUnmarshal(t *testing.T, sig string) { t.FailNow() } - t.Log("content") t.Logf("version: %d", inner.Version) - t.Log("digest algorithm") + t.Log("digest algorithm:") + t.Log("==================") for _, di := range inner.DigestAlgorithmIdentifiers { t.Logf("\t %v: %v", di.Algorithm, di.Parameters) } t.Logf("content info: %v", inner.ContentInfo) + t.Log("==================") + t.Logf("\tcontent type: %v", inner.ContentInfo.ContentType) + t.Logf("\tcontent: %v", inner.ContentInfo.Content) t.Log("certificates:") + t.Log("==================") certs, err := inner.Certificates.Parse() if err == nil { for _, cert := range certs { t.Logf("\tissuer: %v", cert.Issuer) t.Logf("\tserialNumber: %v", cert.SerialNumber) + t.Logf("\tCA: %v", cert.IsCA) } } - t.Log("crl:") + t.Log("CRL:") + t.Log("==================") for _, crl := range inner.CRLs { t.Logf("\talgorithm: %v", crl.SignatureAlgorithm) t.Logf("\tvalue: %v", crl.SignatureValue) @@ -353,23 +362,79 @@ func testUnmarshal(t *testing.T, sig string) { } t.Log("signers", len(inner.SignerInfos)) + t.Log("==================") if len(inner.SignerInfos) > 0 { si := inner.SignerInfos[0] t.Logf("version: %d", si.Version) t.Log("issuer:") + var issuer pkix.RDNSequence + _, err = asn1.Unmarshal(si.IssuerAndSerialNumber.IssuerName.FullBytes, &issuer) + if err != nil { + t.Logf("\terr: %v", err) + } + + t.Logf("issuer: %v\n", issuer) + t.Logf("\tissuer Name: %v", string(si.IssuerAndSerialNumber.IssuerName.Bytes)) t.Logf("\tserial Number: %v", si.IssuerAndSerialNumber.SerialNumber) - t.Logf("digest alg: %v", si.DigestAlgorithm) + t.Logf("\tdigest alg: %v", si.DigestAlgorithm) t.Log("authentication attributes:") for _, attr := range si.AuthenticatedAttributes { t.Log("\toid", attr.Type) - var test string - if _, err := asn1.Unmarshal(attr.Value.Bytes, &test); err == nil { - t.Log("\tvalue string:", test) + if attr.Type.Equal(OIDAttributeContentType) { + var v asn1.ObjectIdentifier + if _, err := asn1.Unmarshal(attr.Value.Bytes, &v); err != nil { + t.Log("err", err) + continue + } + + t.Logf("\tvalue: %v", v) + } else if attr.Type.Equal(OIDAttributeMessageDigest) { + t.Log("\tmessage digest:") + t.Log("\tvalue", string(attr.Value.Bytes)) + } else if attr.Type.Equal(OIDAttributeSigningCertificateV2) { + var signingCert signingCertificateV2 + if _, err := asn1.Unmarshal(attr.Value.Bytes, &signingCert); err != nil { + t.Log("err", err) + continue + } + t.Log("\tSigning Certificates:") + for _, cert := range signingCert.Certs { + t.Logf("\t\tHash Algoritm: %v", cert.HashAlgorithm) + t.Logf("\t\tCert hash: %v", string(cert.CertHash)) + t.Logf("\t\tIssuer and Serial: %v", cert.IssuerSerial) + } + } else if attr.Type.Equal(OIDAttributeAdobeRevocation) { + // t.Logf("raw: %v", base64.StdEncoding.EncodeToString(attr.Value.Bytes)) + + var revInfo RevocationInfoArchival + if leftover, err := asn1.Unmarshal(attr.Value.Bytes, &revInfo); err != nil || len(leftover) > 0 { + t.Log("err", err) + continue + } + + for _, ocspx := range revInfo.Ocsp { + // verify ocsp response + ocspRes, err := ocsp.ParseResponseForCert(ocspx.FullBytes, certs[0], certs[1]) + if err != nil { + t.Log("err", err) + continue + } + + t.Logf("Status: %v", ocspRes.Status) + t.Logf("SerialNumber: %v", ocspRes.SerialNumber) + t.Logf("ProducedAt: %v", ocspRes.ProducedAt) + } + } else { - t.Log("\tvalue", base64.StdEncoding.EncodeToString(attr.Value.Bytes)) + var test string + if _, err := asn1.Unmarshal(attr.Value.Bytes, &test); err == nil { + t.Log("\tvalue string:", test) + } else { + t.Log("\tvalue", attr.Value.Bytes) + } } } @@ -379,13 +444,35 @@ func testUnmarshal(t *testing.T, sig string) { for _, attr := range si.UnauthenticatedAttributes { t.Log("\toid", attr.Type) - var test string - if _, err := asn1.Unmarshal(attr.Value.Bytes, &test); err == nil { - t.Log("\tvalue string:", test) + if attr.Type.Equal(OIDAttributeTimeStampToken) { + v, err := ParseTS(attr.Value.Bytes) + if err != nil { + t.Log("err", err) + continue + } + + t.Logf("\thash algo: %v", v.HashAlgorithm) + t.Logf("\tHashed: %v", v.HashedMessage) + t.Logf("\tTime: %v", v.Time) + t.Logf("\tAccuracy: %v", v.Accuracy) + t.Log("\tCertificates:") + for _, cert := range v.Certificates { + t.Logf("\t\tIssuer: %v", cert.Issuer) + t.Logf("\t\tSerial: %v", cert.SerialNumber) + } } else { - t.Log("\tvalue", base64.StdEncoding.EncodeToString(attr.Value.Bytes)) + var test string + if _, err := asn1.Unmarshal(attr.Value.Bytes, &test); err == nil { + t.Log("\tvalue string:", test) + } else { + t.Log("\tvalue", attr.Value.Bytes) + } } + } } + t.Log("<=====================================>") + t.Log("<=====================================>") + } diff --git a/timestamp.go b/timestamp.go index 41c5f1d..d762091 100644 --- a/timestamp.go +++ b/timestamp.go @@ -8,6 +8,7 @@ package pkcs7 // import "go.mozilla.org/pkcs7" import ( "crypto" + "crypto/rand" "crypto/x509" "crypto/x509/pkix" "encoding/asn1" @@ -17,6 +18,20 @@ import ( "time" ) +var ( + nonceBytes = 16 +) + +// GenerateNonce generates a new nonce for this TSR. +func GenerateNonce() *big.Int { + buf := make([]byte, nonceBytes) + if _, err := rand.Read(buf); err != nil { + panic(err) + } + + return new(big.Int).SetBytes(buf[:]) +} + // Timestamp represents an timestamp. See: // https://tools.ietf.org/html/rfc3161#section-2.4.1 type Timestamp struct { @@ -141,6 +156,7 @@ func (req *TSRequest) Marshal() ([]byte, error) { }, CertReq: req.Certificates, Extensions: req.ExtraExtensions, + Nonce: GenerateNonce(), }) }