我似乎无法让任何xmlsec1符号调用工作;我现在尝试了几种场景,我能想出的最好结果是以下错误消息:
root@sbe:/srv/jarsigner-keystore# xmlsec1 sign --privkey-pem MEDELEXIS_SWD_SRV.p12.key.pem unsignedTemplate.xml
func=xmlSecOpenSSLDsaSha1EvpSign:file=signatures.c:line=639:obj=unknown:subj=unknown:error=11:invalid size:size(r)=32 or size(s)=32 > 20
func=xmlSecOpenSSLEvpSignatureExecute:file=signatures.c:line=491:obj=dsa-sha1:subj=EVP_SignFinal:error=4:crypto library function failed:
func=xmlSecTransformDefaultPushBin:file=transforms.c:line=2207:obj=dsa-sha1:subj=xmlSecTransformExecute:error=1:xmlsec library function failed:final=1
func=xmlSecTransformIOBufferClose:file=transforms.c:line=2891:obj=dsa-sha1:subj=xmlSecTransformPushBin:error=1:xmlsec library function failed:
func=xmlSecTransformC14NPushXml:file=c14n.c:line=279:obj=exc-c14n:subj=xmlOutputBufferClose:error=5:libxml2 library function failed:
func=xmlSecTransformCtxXmlExecute:file=transforms.c:line=1236:obj=unknown:subj=xmlSecTransformPushXml:error=1:xmlsec library function failed:transform=exc-c14n
func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=614:obj=unknown:subj=xmlSecTransformCtxXmlExecute:error=1:xmlsec library function failed:
func=xmlSecDSigCtxSign:file=xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec library function failed:
Error: signature failed
Error: failed to sign file "unsignedTemplate.xml"我不知道什么是无效的大小:大小(R)=32或大小(S)=32> 20是关于什么的?!我用pkcs12尝试了几个键的组合,转换成pem,每次上面提到的错误都是我能得到的最好的。原始证书是使用尼奥明创建的,所以我想这应该是正确的!
当我使用xmlsec 1.2.18时,唯一遗漏的是尝试用更新的openssl编译1.2.19 .但几个小时后,这只是提出了新的问题,这将不得不被堆积如山!
任何帮助都很感激!
发布于 2013-11-09 21:35:56
这个问题只发生在DSA密钥上,其大小为>=2048位!因此,例如,以下内容失败了
openssl dsaparam 2048 > dsaparam
openssl gendsa -out keydsa.pem dsaparam
xmlsec1 sign --output doc-signed-x509.xml --privkey-pem keydsa.pem unsigned.xml而下面的工作
openssl dsaparam 2047 > dsaparam
openssl gendsa -out keydsa.pem dsaparam
xmlsec1 sign --output doc-signed-x509.xml --privkey-pem keydsa.pem unsigned.xml是时候报告窃听器了吗?
https://stackoverflow.com/questions/19860842
复制相似问题