aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/test_pkey_ec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_pkey_ec.rb')
-rw-r--r--test/openssl/test_pkey_ec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb
index ffe5a94e..4670c10a 100644
--- a/test/openssl/test_pkey_ec.rb
+++ b/test/openssl/test_pkey_ec.rb
@@ -72,6 +72,14 @@ class OpenSSL::TestEC < OpenSSL::PKeyTestCase
assert_equal key.to_der, deserialized.to_der
end
+ def test_to_data
+ p256 = Fixtures.pkey("p256")
+
+ data = p256.to_data
+ assert_equal "prime256v1", data[:group]
+ assert_equal p256.private_key, data[:priv]
+ end
+
def test_check_key
key0 = Fixtures.pkey("p256")
assert_equal(true, key0.check_key)