crypto: add API to retrieve key type OID
Some users suggested that it would be helpful to have access to the OID of KeyObject
s. Luckily, OpenSSL does manage OIDs, so there is little to do on our side.
What do you think? Should we expose the OID? And if so, is this the right name for such a property?
OpenSSL also provides nice names for most OIDs, but as far as I know, these are not standardized and not guaranteed to exist for all OIDs, and there are sometimes two variants (a short and a long name), so I am not sure whether it would be a good idea to expose these. Maybe someone else knows more.
cc @nodejs/crypto, @panva, @omsmith.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines