forked from ruby/openssl
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkey: add :format keyword argument to PKey::PKey#to_{der,pem}
Currently they return XXXPrivateKey format (PKCS ruby#1 RSAPrivateKey for RSA, OpenSSL's original format for DSA, anad SEC 1 ECPrivateKey for EC) when the instance contains the private portion, or PUBKEY format (SubjectPublicKeyInfo) otherwise. There is no option to force the format, so users need to duplicate the key first and remove the private key. This resolves it by adding :format keyword argument to PKey::PKey#to_{der,pem}. Users can pass either :PrivateKey or :PUBKEY.
- Loading branch information
Showing
8 changed files
with
274 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.