ツールcertlint、特にcablint-ctというモジュールを実行しようとしていますが、試行するとエラーが発生します。 certlint、cablint、cablint-ctの3つのモジュールがあります。これらのモジュールはcablint-ctを除いて動作します。ここでcertlintツールのcablint-ct部分の実行に問題があります
は、私はRubyで実行しているコマンドである:ここでは
ruby -I "/certlint-master/lib" "/certlint-master/bin/cablint-ct" "cert.der"
は私が受信エラーである:ここでは
/certlint-master/lib/certlint/ct.rb:149:in `initialize': undefined method `+' for nil:NilClass (NoMethodError)
from /certlint-master/bin/cablint-ct:39:in `new'
from /certlint-master/bin/cablint-ct:39:in `<main>'
はct.rb内のコードの参照ブロック(ライン39)であります:
30 def initialize(tbs_der)
31 asn = OpenSSL::ASN1.decode(tbs_der)
32 # tbsCertificate.version is optional, so we don't have a fixed
33 # offset. Check if the first item is a pure ASN1Data, which
34 # is a strong hint that it is an EXPLICIT wrapper for the first
35 # element in the struct. If so, this is the version, so everything
36 # is offset by one.
37 skip = asn.value[0].instance_of?(OpenSSL::ASN1::ASN1Data) ? 1 : 0
38 sig_alg_der = asn.value[1 + skip].to_der
39 @raw = OpenSSL::ASN1::Sequence.new([tbs_der, sig_alg_der, DER_SIG]).to_der
40 super(@raw)
41 end
42 end
とct.rb(ライン149)
148 def initialize(log)
149 @log = URI.parse(log + '/').normalize
150 end
私はツールのオーナーと一緒にgithubにissue #37を開いていますが、まだ回答がありません。
誰かが私の命令に間違っているかどうか、あるいはどこかにコーディングの問題があるかどうかを誰かに見ていただければ幸いですか?
UPDATE 1
私は、私はむしろ、コマンドの中に証明書ファイルをURLを渡しする必要があることを考え出しています。例えば:私は、コードはこのURLからJSON応答を期待して、このリンクは、JSONデータを含むファイルを返すと信じ
ruby -I "/certlint-master/lib" "/certlint-master/bin/cablint-ct" "https://ct.ws.symantec.com/ct/v1/get-entries?start=932966&end=932966"
は、しかし、私は次のエラーを取得する:
/usr/share/ruby/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
from /usr/share/ruby/json/common.rb:155:in `new'
from /usr/share/ruby/json/common.rb:155:in `parse'
from /certlint-master/lib/certlint/ct.rb:184:in `_call'
from /certlint-master/lib/certlint/ct.rb:160:in `get_entries'
from /certlint-master/bin/cablint-ct:40:in `<main>'
任意のアイデア?