Project

General

Profile

« Previous | Next » 

Revision 6f008c9d

Added by rhenium (Kazuki Yamaguchi) about 5 years ago

[ruby/openssl] pkey: add PKey#inspect and #oid

Implement OpenSSL::PKey::PKey#oid as a wrapper around EVP_PKEY_id().
This allows user code to check the type of a PKey object.

EVP_PKEY can have a pkey type for which we do not provide a dedicated
subclass. In other words, an EVP_PKEY that is not any of {RSA,DSA,DH,EC}
can exist. It is currently not possible to distinguish such a pkey.

Also, implement PKey#inspect to include the key type for convenience.

https://github.com/ruby/openssl/commit/dafbb1b3e6