diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-12-20 19:06:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 19:06:26 +0900 |
commit | 5d0df4027eec069ad5e169328ea2c67eaf7bfa73 (patch) | |
tree | 8b5e14d3498e2cb0b8d5cc008905b73ac4f3bbc1 /ext/openssl/ossl_pkey_dh.c | |
parent | 88b7577b26f3d810335fc345f9ddca9af1102f4e (diff) | |
parent | 6848d2d969d90e6a400d89848ecec21076b87888 (diff) | |
download | ruby-openssl-5d0df4027eec069ad5e169328ea2c67eaf7bfa73.tar.gz |
Merge pull request #480 from rhenium/ky/pkey-deprecate-modify
pkey: deprecate PKey::*#set_* and PKey::{DH,EC}#generate_key!
Diffstat (limited to 'ext/openssl/ossl_pkey_dh.c')
-rw-r--r-- | ext/openssl/ossl_pkey_dh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c index d6f32c62..696455dc 100644 --- a/ext/openssl/ossl_pkey_dh.c +++ b/ext/openssl/ossl_pkey_dh.c @@ -58,15 +58,16 @@ VALUE eDHError; * * Examples: * # Creating an instance from scratch - * dh = DH.new + * # Note that this is deprecated and will not work on OpenSSL 3.0 or later. + * dh = OpenSSL::PKey::DH.new * dh.set_pqg(bn_p, nil, bn_g) * * # Generating a parameters and a key pair - * dh = DH.new(2048) # An alias of DH.generate(2048) + * dh = OpenSSL::PKey::DH.new(2048) # An alias of OpenSSL::PKey::DH.generate(2048) * * # Reading DH parameters - * dh = DH.new(File.read('parameters.pem')) # -> dh, but no public/private key yet - * dh.generate_key! # -> dh with public and private key + * dh_params = OpenSSL::PKey::DH.new(File.read('parameters.pem')) # loads parameters only + * dh = OpenSSL::PKey.generate_key(dh_params) # generates a key pair */ static VALUE ossl_dh_initialize(int argc, VALUE *argv, VALUE self) |