[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing private key PK - Invalid key tag or value


On 6/30/22 07:43, Heiko Thiery wrote:
Hi,

I use netopeer2 with libnetconf2 in combination with libssh and
mbedtls. When trying to open a SSH connection I get the following
message:

[INF]: LN: Accepted a connection on 0.0.0.0:830 from 127.0.0.1:38712.
[INF]: SR: Session 128 (user "root", CID 38) created.
[2022/06/28 07:31:06.841984, 1] pki_private_key_from_base64:  Parsing
private key PK - Invalid key tag or value
[ERR]: LN: Failed to set hostkey "genkey" (/tmp/gyFsev).

Switching to use openSSL does not show this error.

Anyone have an explanation for this?

Do you have example key with this issue?

I think the mbedtls and gcrypt did not have PEM parser or there were some limitations.

It might also be that the openssl you are using is generating keys with some specific functionality that is not supported by mbedtls parser.

Regards,
--
Jakub Jelen
Crypto Team, Security Engineering
Red Hat, Inc.


Follow-Ups:
Re: Parsing private key PK - Invalid key tag or valueHeiko Thiery <heiko.thiery@xxxxxxxxx>
References:
Parsing private key PK - Invalid key tag or valueHeiko Thiery <heiko.thiery@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org