ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: zzak@ruby-lang.org
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:49256] [Ruby trunk - Bug #9833] OpenSSL::X509::Certificate#inspect がわかりにくくなっている
Date: Sun, 13 Sep 2015 03:26:32 +0000	[thread overview]
Message-ID: <redmine.journal-54165.20150913032631.2d6ed1cc3049c4b0@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-9833.20140513090143@ruby-lang.org

Issue #9833 has been updated by Zachary Scott.

Assignee set to openssl

----------------------------------------
Bug #9833: OpenSSL::X509::Certificate#inspect がわかりにくくなっている
https://bugs.ruby-lang.org/issues/9833#change-54165

* Author: Kazuhiro NISHIYAMA
* Status: Open
* Priority: Normal
* Assignee: openssl
* ruby -v: 2.0.0p195
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
SSL/TLS の証明書の簡易的なチェックに OpenSSL::X509::Certificate#inspect を便利に使っていたのですが、最近の ruby だと subject などに内容が出なくなってわかりにくくなっているのですが、以前のように内容が出た方が良いと思うのですが、どうでしょうか。

```
% cat inspect_cert.rb
#!/usr/bin/env ruby
require 'openssl'
require 'socket'
host = ARGV.shift
port = ARGV.shift.to_i
sock = TCPSocket.open(host, port)
ssl = OpenSSL::SSL::SSLSocket.new(sock)
ssl.connect
p ssl.peer_cert
% ruby1.9.1 -v inspect_cert.rb www.ruby-lang.org 443
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=/OU=Domain Control Validated/CN=*.ruby-lang.org, issuer=/C=BE/O=GlobalSign nv-sa/CN=GlobalSign Domain Validation CA - SHA256 - G2, serial=1492412345881966875081918063955459968936780, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
% ruby -v inspect_cert.rb www.ruby-lang.org 443
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
#<OpenSSL::X509::Certificate subject=#<OpenSSL::X509::Name:0x007f9b7960b230>, issuer=#<OpenSSL::X509::Name:0x007f9b7960b1b8>, serial=#<OpenSSL::BN:0x007f9b7960b140>, not_before=2014-04-12 01:22:02 UTC, not_after=2014-08-25 05:22:02 UTC>
```




-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2015-09-13  3:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-9833.20140513090143@ruby-lang.org>
2014-05-13  9:01 ` [ruby-dev:48217] [ruby-trunk - Bug #9833] [Open] OpenSSL::X509::Certificate#inspect がわかりにくくなっている zn
2015-09-13  3:26 ` zzak [this message]
2019-08-11 18:23 ` [ruby-dev:50832] [Ruby master Bug#9833] " merch-redmine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-54165.20150913032631.2d6ed1cc3049c4b0@ruby-lang.org \
    --to=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).