blob: 38c4796323d8898bdc1f8c5ece94348241fda314 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
package libebics
import "encoding/xml"
type DSIGX509Data struct {
XMLName xml.Name `xml:"ds:X509Data"`
DSIGX509Certificate string `xml:"ds:X509Certificate"` // TODO Properly marshal this
}
type DSIGSignatureType struct {
SignedInfo DSIGSignedInfo `xml:"ds:SignedInfo"`
SignatureValue string `xml:"ds:SignatureValue"` // TODO Properly marshal this
}
type DSIGSignedInfo struct {
XMLName xml.Name `xml:"ds:SignedInfo"`
Xmlns string `xml:"xmlns,attr"`
Ds string `xml:"xmlns:ds,attr"`
CanonicalizationMethod DSIGCanonicalizationMethod `xml:"ds:CanonicalizationMethod"`
SignatureMethod DSIGSignatureMethod `xml:"ds:SignatureMethod"`
Reference DSIGReference `xml:"ds:Reference"`
}
type DSIGCanonicalizationMethod struct {
XMLName xml.Name `xml:"ds:CanonicalizationMethod"`
Algorithm string `xml:"Algorithm,attr"`
}
type DSIGSignatureMethod struct {
XMLName xml.Name `xml:"ds:SignatureMethod"`
Algorithm string `xml:"Algorithm,attr"`
}
type DSIGReference struct {
XMLName xml.Name `xml:"ds:Reference"`
URI string `xml:"URI,attr"`
Transforms DSIGTransforms `xml:"ds:Transforms"`
DigestMethod DSIGDigestMethod `xml:"ds:DigestMethod"`
DigestValue string `xml:"ds:DigestValue"`
}
type DSIGTransforms struct {
XMLName xml.Name `xml:"ds:Transforms"`
Transform DSIGTransform `xml:"ds:Transform"` // TODO make proper list
}
type DSIGTransform struct {
XMLName xml.Name `xml:"ds:Transform"`
Algorithm string `xml:"Algorithm,attr"`
}
type DSIGDigestMethod struct {
XMLName xml.Name `xml:"ds:DigestMethod"`
Algorithm string `xml:"Algorithm,attr"`
}
|