Cygwin 環境でhttps://www.aleksey.com/xmlsec/news.htmlから XMLSec の最新リリースをコンパイルしました。この例に従って、セッション キーとデジタル署名を使用して XML ファイルを暗号化します。http://users.dcc.uchile.cl/~pcamacho/tutorial/web/xmlsec/xmlsec.html#htoc9 CBC には重大なセキュリティ上の問題があるため、3DES の代わりに AES-128-GCM を使用して強化したいと考えています。 192-CBC。Session-Key-Template.xml を次のように変更してみました
<EncryptedData
xmlns="http://www.w3.org/2001/04/xmlenc#"
xmlns:enc11="http://www.w3.org/2009/xmlenc11#"
Type="http://www.w3.org/2001/04/xmlenc#Element">
<EncryptionMethod enc11:Algorithm=
"http://www.w3.org/2009/xmlenc11#aes128-gcm" />
しかし、これにより、アルゴリズムが見つからないというエラーが表示されます。コンソール出力は
xmlsec1 encrypt --pubkey-pem pub-userkey.pem --session-key aes-128 --xml- data doc-plain.xml --output doc-encrypted.xml session-key-template.xml
func=xmlSecTransformNodeRead:file=transforms.c:line=1543:obj=unknown:subj=xmlSec
TransformIdListFindByHref:error=1:xmlsec library function
failed:href=http://www.w3.org/2009/xmlenc11#aes128-gcm
func=xmlSecTransformCtxNodeRead:file=transforms.c:line=694
:obj=unknown:subj=xmlSecTransformNodeRead:error=1:
xmlsec library function failed:name=EncryptionMethod
func=xmlSecEncCtxEncDataNodeRead:file=xmlenc.c:line=905:
obj=unknown:subj=xmlSecTransformCtxNodeRead:error=1:
xmlsec library function failed:node=EncryptionMethod
func=xmlSecEncCtxXmlEncrypt:file=xmlenc.c:line=386:
obj=unknown:subj=xmlSecEncCtxEncDataNodeRead:error=1:
xmlsec library function failed:
Error: failed to encrypt xml file "doc-plain.xml"
Error: failed to encrypt file with template "session-key-template.xml"
誰かがこれを正しく設定する方法を知っていますか?