|
02) Generate self-signed certificate
[email protected] ~]# OpenSSL req-new-x509-key server1024.key-out server.crt-days 365
Req <-for creating a new certificate
New <-indicates that the certificate was created
X509 <-indicates that the format of the definition certificate is in standard format
Key <-represents the private key file information for the call
Out <-indicates output certificate file information
Days <-indicates the validity period of the certificate
You is about-to is asked to-enter information that'll be incorporated
into your certificate request.
What's about-to-enter is called a distinguished Name or a DN.
There is quite a few fields but can leave some blank
For some fields there would be a default value,
If you enter '. ', the field would be a left blank.
-----
Country Name (2 letter code) [XX]:CN <-defines the country that generated the certificate
State or province name (full name) []:BJ <-defines the province in which the certificate is generated
Locality Name (eg, city) [Default city]:bj <-define the cities where the certificate is generated
Organization Name (eg, company) [Default Ltd]:oldboy <-defines the organization that generated the certificate
Organizational unit Name (eg, section) []:it <-define the function that generated the certificate
Common name (eg, your name or your server ' s hostname) []:oldboy.com.cn <-define host server name
Note: This output information is very important, before the client obtains the certificate, it uses the host name to establish a connection between the corresponding server, and then obtains the certificate
Email Address []:
#openssl x509-text-in server.crt <-to view the information in a certificate
|