Skip to content

Commit dc4599c

Browse files
committed
test that we read authority keyid back just fine (for a while now)
for jruby/jruby#994
1 parent c84ba85 commit dc4599c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/ruby/x509/test_x509cert.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@ def test_to_text_regression
275275
assert cert.to_text.index('Signature Algorithm: sha256WithRSAEncryption')
276276
end
277277

278+
def test_to_text_read_back
279+
crt = File.expand_path('ca.crt', File.dirname(__FILE__))
280+
cert = OpenSSL::X509::Certificate.new File.read(crt)
281+
assert cert.to_text.index('X509v3 Authority Key Identifier:')
282+
assert cert.to_text.match /X509v3 Authority Key Identifier:\s*keyid:BA:5E:E9:90:3B:5B:F6:79:A2:D3:65:09:C5:39:6A:E7:43:6B:F8:3D/m
283+
end
284+
278285
def test_to_text_npe_regression
279286
# https://github.com/jruby/jruby-openssl/issues/78
280287
key = OpenSSL::PKey::RSA.generate(2048)

0 commit comments

Comments
 (0)