mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_x509cert.c: fixed whitespace issues
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
515d546d76
commit
783fb0881f
1 changed files with 7 additions and 7 deletions
|
@ -765,13 +765,13 @@ Init_ossl_x509cert()
|
||||||
* File.open("cert.pem", "wb") { |f| f.print cert.to_pem }
|
* File.open("cert.pem", "wb") { |f| f.print cert.to_pem }
|
||||||
*
|
*
|
||||||
* X.509 certificates are associated with a private/public key pair,
|
* X.509 certificates are associated with a private/public key pair,
|
||||||
* typically a RSA, DSA or ECC key (see also OpenSSL::PKey::RSA,
|
* typically a RSA, DSA or ECC key (see also OpenSSL::PKey::RSA,
|
||||||
* OpenSSL::PKey::DSA and OpenSSL::PKey::EC), the public key itself is
|
* OpenSSL::PKey::DSA and OpenSSL::PKey::EC), the public key itself is
|
||||||
* stored within the certificate and can be accessed in form of an
|
* stored within the certificate and can be accessed in form of an
|
||||||
* OpenSSL::PKey. Certificates are typically used to be able to associate
|
* OpenSSL::PKey. Certificates are typically used to be able to associate
|
||||||
* some form of identity with a key pair, for example web servers serving
|
* some form of identity with a key pair, for example web servers serving
|
||||||
* pages over HTTPs use certificates to authenticate themselves to the user.
|
* pages over HTTPs use certificates to authenticate themselves to the user.
|
||||||
*
|
*
|
||||||
* The public key infrastructure (PKI) model relies on trusted certificate
|
* The public key infrastructure (PKI) model relies on trusted certificate
|
||||||
* authorities ("root CAs") that issue these certificates, so that end
|
* authorities ("root CAs") that issue these certificates, so that end
|
||||||
* users need to base their trust just on a selected few authorities
|
* users need to base their trust just on a selected few authorities
|
||||||
|
@ -787,7 +787,7 @@ Init_ossl_x509cert()
|
||||||
* First, we need to create a "self-signed" root certificate. To do so,
|
* First, we need to create a "self-signed" root certificate. To do so,
|
||||||
* we need to generate a key first. Please note that the choice of "1"
|
* we need to generate a key first. Please note that the choice of "1"
|
||||||
* as a serial number is considered a security flaw for real certificates.
|
* as a serial number is considered a security flaw for real certificates.
|
||||||
* Secure choices are integers in the two-digit byte range and ideally
|
* Secure choices are integers in the two-digit byte range and ideally
|
||||||
* not sequential but secure random numbers, steps omitted here to keep
|
* not sequential but secure random numbers, steps omitted here to keep
|
||||||
* the example concise.
|
* the example concise.
|
||||||
*
|
*
|
||||||
|
@ -811,7 +811,7 @@ Init_ossl_x509cert()
|
||||||
*
|
*
|
||||||
* The next step is to create the end-entity certificate using the root CA
|
* The next step is to create the end-entity certificate using the root CA
|
||||||
* certificate.
|
* certificate.
|
||||||
*
|
*
|
||||||
* key = OpenSSL::PKey::RSA.new 2048
|
* key = OpenSSL::PKey::RSA.new 2048
|
||||||
* cert = OpenSSL::X509::Certificate.new
|
* cert = OpenSSL::X509::Certificate.new
|
||||||
* cert.version = 2
|
* cert.version = 2
|
||||||
|
@ -827,7 +827,7 @@ Init_ossl_x509cert()
|
||||||
* cert.add_extension(ef.create_extension("keyUsage","digitalSignature", true))
|
* cert.add_extension(ef.create_extension("keyUsage","digitalSignature", true))
|
||||||
* cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
|
* cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
|
||||||
* cert.sign(root_key, OpenSSL::Digest::SHA256.new)
|
* cert.sign(root_key, OpenSSL::Digest::SHA256.new)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);
|
cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue