prevent <?xml verion> being output during encryption

This commit is contained in:
andrew.smith@miracl.com
2016-10-31 17:00:08 +00:00
parent 4c0831706e
commit 1720c7896d
2 changed files with 12 additions and 1 deletions

View File

@@ -279,5 +279,8 @@ func Encrypt(publicKey, doc []byte, opts EncryptOptions) ([]byte, error) {
}
encDataNode = nil // the template is inserted in the doc, so we don't own it
return dumpDoc(parsedDoc), nil
rootNode := C.xmlDocGetRootElement(parsedDoc)
buf := dumpNode(rootNode)
return buf, nil
}