initial (broken) implementation of xmlenc

This commit is contained in:
Ross Kinder
2015-10-21 15:07:57 -04:00
parent ec5ce6bec4
commit 83593a6168
5 changed files with 532 additions and 7 deletions

26
xmlenc/model.go Normal file
View File

@@ -0,0 +1,26 @@
package xmlenc
import (
"encoding/xml"
)
type EncryptedData struct {
XMLName xml.Name `xml:"http://www.w3.org/2001/04/xmlenc#"`
EncryptionMethod EncryptionMethod
KeyInfo KeyInfo
CipherDataValue string `xml:"CipherData>CipherValue"`
}
type EncryptionMethod struct {
Algorithm string `xml:",attr"`
}
type KeyInfo struct {
XMLName xml.Name `xml:"http://www.w3.org/2000/09/xmldsig# KeyInfo"`
KeyName string `xml:"KeyName"`
X509Data *X509Data `xml:"X509Data,omitempty"`
}
type X509Data struct {
X509Certificate string `xml:"X509Certificate,omitempty"`
}