dumpon: provide diag info when `PEM_read_RSA_PUBKEY` fails
authorEnji Cooper <ngie@FreeBSD.org>
Sat, 27 May 2023 01:02:34 +0000 (18:02 -0700)
committerEnji Cooper <ngie@FreeBSD.org>
Sat, 27 May 2023 01:05:04 +0000 (18:05 -0700)
commit52b63df9b6dfc157fb0b9f61a770b64e3663dee9
tree543b071ef3e9505514561d97895f124ed088dfc1
parentda8c3d21490fe791f8e4405216d5490dbea4dbe5
dumpon: provide diag info when `PEM_read_RSA_PUBKEY` fails

This change modifies dumpon to print out the last error from OpenSSL
when `PEM_read_RSA_PUBKEY` fails. This allows end-users to diagnose why
reading in RSA pubkey files fails so they can adjust the usage to meet
the needs of the command.

MFC after: 1 week
sbin/dumpon/dumpon.c