Adapt i2d_PrivateKey for provider only keys
authorRichard Levitte <levitte@openssl.org>
Tue, 11 Feb 2020 05:29:08 +0000 (06:29 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 14 Feb 2020 13:14:16 +0000 (14:14 +0100)
commit3e686afd04a99e64b70a7c2ef488459ed10ad392
tree562d45ee588094a93f4b26692029a16aa343a31d
parent6d9b4d7f4bf1ea9bc1d1b1bd8b7e83c6fbeed395
Adapt i2d_PrivateKey for provider only keys

It uses EVP_PKEY serializers to get the desired results.

One might think that ddoing this might make things a bit dicy for
existing serializers, as they should obviously use i2d functions.
However, since our serializers use much more primitive functions
such as i2d_ASN1_INTEGER(), or keytype specific ones such as
i2d_RSAPrivateKey(), there is no clash.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11056)
crypto/asn1/i2d_pr.c