Hi,
I've written code to decode the openssh_key format. It detects the header, and if its
"-----BEGIN OPENSSH PRIVATE KEY-----", it reads the data between header and footer and start processing that. If this header is not found, it calls OSSL_DECODER_CTX_new_for_pkey(&spk, "PEM", NULL, NULL, EVP_PKEY_KEYPAIR, NULL, NULL) and OSSL_DECODER_from_bio.
It works, different files of different schemes are read succesfully.
Is it possible to add a decoder (a custom decoder) to read the openssh key format, so I do not have to open the file using an fd, check for the openssh header, if not found open it using BIO. I've read about OSSL_DECODER_CTX_add_decoder, but I need an example here.
Thanks,
Stef