diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-14 11:19:16 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-14 11:19:16 +0000 |
commit | ed2b4d0a42d47f8105ec9c1199dcda0e74a2cd29 (patch) | |
tree | 5f9e4d02865eb8fc4bb923a3b4659497086a7007 /ext/openssl/lib | |
parent | e9935d9c04f88deb3a379784821fd1974f9cc667 (diff) |
openssl: import v2.1.0
Import Ruby/OpenSSL 2.1.0. Commits since v2.1.0.beta2 can be found at:
https://github.com/ruby/openssl/compare/v2.1.0.beta2...v2.1.0
----------------------------------------------------------------
Kazuki Yamaguchi (8):
test/test_ssl: prevent changing default internal encoding
ssl: remove a misleading comment
pkey/ec: rearrange PKey::EC::Point#initialize
ssl: remove unreachable code
asn1: fix docs
pkey/ec: add support for octet string encoding of EC point
Ruby/OpenSSL 2.0.7
Ruby/OpenSSL 2.1.0
eregon (1):
Fix test-all tests to avoid creating report_on_exception warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r-- | ext/openssl/lib/openssl/pkey.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/pkey.rb b/ext/openssl/lib/openssl/pkey.rb index dcedd849a0..8a547c340d 100644 --- a/ext/openssl/lib/openssl/pkey.rb +++ b/ext/openssl/lib/openssl/pkey.rb @@ -1,3 +1,25 @@ # frozen_string_literal: false -module OpenSSL +#-- +# Ruby/OpenSSL Project +# Copyright (C) 2017 Ruby/OpenSSL Project Authors +#++ + +module OpenSSL::PKey + if defined?(EC) + class EC::Point + # :call-seq: + # point.to_bn([conversion_form]) -> OpenSSL::BN + # + # Returns the octet string representation of the EC point as an instance of + # OpenSSL::BN. + # + # If _conversion_form_ is not given, the _point_conversion_form_ attribute + # set to the group is used. + # + # See #to_octet_string for more information. + def to_bn(conversion_form = group.point_conversion_form) + OpenSSL::BN.new(to_octet_string(conversion_form), 2) + end + end + end end |