From d6ef404d9f35024e2c870fae1b9f3d6df929e39d Mon Sep 17 00:00:00 2001 From: zhenglixin Date: Sat, 18 Feb 2017 18:50:57 +0800 Subject: [PATCH] add URI in Reference --- signature.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/signature.go b/signature.go index 9fd759f..7349ad8 100644 --- a/signature.go +++ b/signature.go @@ -26,6 +26,7 @@ type Method struct { // type Reference struct { XMLName xml.Name `xml:"http://www.w3.org/2000/09/xmldsig# Reference"` + URI string `xml:",attr"` Transforms []Method `xml:"Transforms>Transform"` DigestMethod Method `xml:"DigestMethod"` DigestValue string `xml:"DigestValue"` @@ -61,6 +62,7 @@ func DefaultSignature(pemEncodedPublicKey []byte) Signature { Algorithm: "http://www.w3.org/2000/09/xmldsig#rsa-sha1", }, Reference: Reference{ + URI: "#pfxd0b69e8d-7ef1-bc79-e854-76787764d7ee", Transforms: []Method{ Method{Algorithm: "http://www.w3.org/2000/09/xmldsig#enveloped-signature"}, },