зеркало из https://github.com/github/ruby.git
* lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.
* lib/webrick/https.rb (HTTPRequest#meta_vars): create SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain. * ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil if no cert-chain was given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
667bdeb072
Коммит
d193b90d54
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Wed Nov 5 08:39:51 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.
|
||||
|
||||
* lib/webrick/https.rb (HTTPRequest#meta_vars): create
|
||||
SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain.
|
||||
|
||||
* ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil
|
||||
if no cert-chain was given.
|
||||
|
||||
Tue Nov 4 23:44:48 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* bcc32/Makefile.sub, win32/Makefile.sub, wince/Makefile.sub:
|
||||
|
|
|
@ -618,6 +618,7 @@ ossl_ssl_get_peer_cert_chain(VALUE self)
|
|||
return Qnil;
|
||||
}
|
||||
chain = SSL_get_peer_cert_chain(ssl);
|
||||
if(!chain) return Qnil;
|
||||
num = sk_num(chain);
|
||||
ary = rb_ary_new2(num);
|
||||
for (i = 0; i < num; i++){
|
||||
|
|
|
@ -24,6 +24,7 @@ module WEBrick
|
|||
if socket && socket.is_a?(OpenSSL::SSL::SSLSocket)
|
||||
@server_cert = @config[:SSLCertificate]
|
||||
@client_cert = socket.peer_cert
|
||||
@client_cert_chain = socket.peer_cert_chain
|
||||
@cipher = socket.cipher
|
||||
end
|
||||
orig_parse(socket)
|
||||
|
@ -46,6 +47,11 @@ module WEBrick
|
|||
meta["HTTPS"] = "on"
|
||||
meta["SSL_SERVER_CERT"] = @server_cert.to_pem
|
||||
meta["SSL_CLIENT_CERT"] = @client_cert ? @client_cert.to_pem : ""
|
||||
if @client_cert_chain
|
||||
@client_cert_chain.each_with_index{|cert, i|
|
||||
meta["SSL_CLIENT_CERT_CHAIN_#{i}"] = cert.to_pem
|
||||
}
|
||||
end
|
||||
meta["SSL_CIPHER"] = @cipher[0]
|
||||
end
|
||||
meta
|
||||
|
|
Загрузка…
Ссылка в новой задаче