I am trying to use
http://ift.tt/1q28Z1Y (please find the program on the link)
to try to sign an xml document
Usage: ./sign3.py xml-doc key-file cert-file
I generated the key file and the cert-file from a p12 certificate given by the webservice provider.
When i run it, I hit the error
func=xmlSecOpenSSLAppKeyLoadBIO:file=app.c:line=263:obj=unknown:subj=PEM_read_bio_PrivateKey and PEM_read_bio_PUBKEY:error=4:crypto library function failed:
func=xmlSecOpenSSLAppKeyLoad:file=app.c:line=153:obj=unknown:subj=xmlSecOpenSSLAppKeyLoadBIO:error=1:xmlsec library function failed:filename=publicCert.pem;errno=2
Traceback (most recent call last):
File "sign3.py", line 159, in <module>
main()
File "sign3.py", line 36, in main
res = sign_file(sys.argv[1], sys.argv[2], sys.argv[3])
File "sign3.py", line 112, in sign_file
None, None, None)
File "/usr/local/lib/python2.7/dist-packages/xmlsec.py", line 458, in cryptoAppKeyLoad
if ret is None: raise Error('xmlSecCryptoAppKeyLoad() failed')
xmlsec.Error: 'xmlSecCryptoAppKeyLoad() failed'
I am trying to find out if this is some issue with my keyfile that I am providing or is it because of xmlsec library expecting details in a specific format. Please do let me know. Has anybody hit this issue while dealing with xml docs ?
No comments:
Post a Comment