D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
OpenSSL
/
SSL
/
SSLContext
/
Filename :
add_certificate-i.ri
back
Copy
U:RDoc::AnyMethod[iI"add_certificate:ETI"-OpenSSL::SSL::SSLContext#add_certificate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"OAdds a certificate to the context. _pkey_ must be a corresponding private ;TI"key with _certificate_.;To:RDoc::Markup::BlankLine o; ; [I"JMultiple certificates with different public key type can be added by ;TI"Qrepeated calls of this method, and OpenSSL will choose the most appropriate ;TI"&certificate during the handshake.;T@o; ; [I"P#cert=, #key=, and #extra_chain_cert= are old accessor methods for setting ;TI"1certificate and internally call this method.;T@S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"_certificate_;T; [o; ; [I">A certificate. An instance of OpenSSL::X509::Certificate.;To;;[I"_pkey_;T; [o; ; [I"KThe private key for _certificate_. An instance of OpenSSL::PKey::PKey.;To;;[I"_extra_certs_;T; [o; ; [I"FOptional. An array of OpenSSL::X509::Certificate. When sending a ;TI"Ncertificate chain, the certificates specified by this are sent following ;TI"._certificate_, in the order in the array.;T@S;; i;I"Example;To:RDoc::Markup::Verbatim; [I"4rsa_cert = OpenSSL::X509::Certificate.new(...) ;TI"(rsa_pkey = OpenSSL::PKey.read(...) ;TI"@ca_intermediate_cert = OpenSSL::X509::Certificate.new(...) ;TI"Ectx.add_certificate(rsa_cert, rsa_pkey, [ca_intermediate_cert]) ;TI" ;TI"ecdsa_cert = ... ;TI"ecdsa_pkey = ... ;TI"another_ca_cert = ... ;TI"Cctx.add_certificate(ecdsa_cert, ecdsa_pkey, [another_ca_cert]);T:@format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"Dctx.add_certificate(certificate, pkey [, extra_certs]) -> self ;T0[ I"(p1, p2, p3 = v3);T@AFI"SSLContext;TcRDoc::NormalClass00