Possible bug in pkcs8 import

David Marín Carreño davefx at gmail.com
Tue Oct 21 18:53:07 CEST 2008


Hi all.

I am developing PKCS#8 import in gnoMint (http://gnomint.sf.net).

For testing what are the error codes obtained while probing the type
of a given file, I have developed a little program that tries to
import a given file as a PEM-codified crypted and unencrypted PKCS8
file, and the same with DER format.

The problem is that I am not able to import any PKCS#8 file, crypted
or unencrypted, DER or PEM. I have generated these PKCS#8 (attached)
files using gnutls (test-pem-crypt.pkcs8), openssl
(test-pem-uncrypt.pkcs8, and both test-der-*.pkcs8), and certtool
(test-pem-crypt2048.pkcs8).

I am obtaining -207 (GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR) while
trying to import a DER file as a PEM file, which is correct. But all
other combinations always result with an error -67
(GNUTLS_E_ASN1_ELEMENT_NOT_FOUND).

Could anyone help me? Is the problem in the PKCS8 files, in my test
program, or in gnutls?

Thank you all.

-- 
David Marín Carreño
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-pem-unencrypt.pkcs8
Type: application/octet-stream
Size: 508 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-pem-crypt.pkcs8
Type: application/octet-stream
Size: 581 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-der-unencrypt.pkcs8
Type: application/octet-stream
Size: 334 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-der-crypt.pkcs8
Type: application/octet-stream
Size: 373 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-pem-crypt2048.pkcs8
Type: application/octet-stream
Size: 1772 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-gnutls.c
Type: application/octet-stream
Size: 1892 bytes
Desc: not available
URL: </pipermail/attachments/20081021/3918385f/attachment-0005.obj>


More information about the Gnutls-devel mailing list