Thu Dec 18 10:33:40 PST 2008
On Thu, Dec 18, 2008 at 03:35:16PM +0100, Damien Leroy wrote:
> For this, I need asymmetric encryption (for both signing and encrypting)
> , e.g., RSA. Such operations are available within crypto_internal. For
> importing public keys, I can use "crypto_public_key_import" that calls
> crypto_rsa_import_public_key (in src/tls/rsa.*) that is supposed to
> import "DER" keys.
> However, if I try to open a DER key file (created using OpenSSL), this
> always stops on the same error : "RSA: Expected INTEGER - found class 0
> tag 0x10".
> It seems to be a format error in the key but I really think the key is ok.
How is your key encapsulated? crypto_internal supports only a limited
number of encoding styles and you can certainly create DER files that it
won't read. I'm using key and certificate files generated with OpenSSL
and it works fine as long as you select one of the support options. If
you think that crypto_internal should have been able to parse the file
you used, please send me an example file so that I can see what is the
exact format used in it.
Jouni Malinen PGP id EFC895FA
More information about the Hostap