Unable to load client pkcs12 certificate from file
Gajim can't establish a connection to my openfire server using mutual authentication. Wireshark reveals that Gajim is sending an empty certificate to the server. At first I thought it was related to my custom made pkcs12 certificate till I saw the following error in the Gajim logging:
(W) nbxmpp.tls_nb: Unable to load client pkcs12 certificate from file C:\test.p12: ([('asn1 encoding routines', 'asn1_d2i_read_bio', 'not enough data')],) ... Is it a valid PKCS12 cert?
I'm not a python programmer but I was able to reproduce the error easily with this small script: import OpenSSL.SSL import OpenSSL.crypto p12 = OpenSSL.crypto.load_pkcs12(open("C:/test.p12",'r').read(),"password")
Traceback (most recent call last): File "", line 1, in OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_D2I_READ_BIO', 'not enough data')]
But if I change file opening mode to 'rb', it works!
Please, can anybody verify this?
Any help will be appreciated. Thanks.