generate a self-signed certificate for it.
[Root @ vpn CA] # openssl req-new-x509-key private/cakey. pem-out cacert. pem-days 3655
Fill in the above information based on your actual situation
4. Create the relevant directories and files of the CA, specify the start Number of the serial number, and
a certificateUse format: OpenSSL x509-text-in filename (certificate)7.Req: order to generate a certificate signing request or a self-visaUse format: A. Generate the self-visa book:OpenSSL req-new -x509 -key/path/to/private.key-out/path/to/cacert.pemB. Generating a certificate signing requestOpenSSL REQ-NEW-KEY/PATH/TO/PRIVATE.KEY-OUT/PATH/TO/CACERT.CSR8.ca:certificate Authority command to sign a certificate requestUse format:
* * * full.Here is an example of HTTP, which describes how SSL works, the whole process is as follows:650) this.width=650; "title=" Ssl.png "alt=" wkiol1pvz8udsc6raahgzcg1uv0854.jpg "src=" http://s3.51cto.com/wyfs02/M02 /46/39/wkiol1pvz8udsc6raahgzcg1uv0854.jpg "/>Since SSL is a protocol that you want to implement, I can use the OpenSSL command, OpenSSL is an open source implementation of SSL, and
Because of the needs of the experiment, you need to manually create the CA certificate and the client and server certificates, which are summarized as follows: In the last two days, you have read some information about certificate creation, I found that many introductions on the Internet are not complete and are not fully operable. @ Echooff @ remsetOPENSSL_HOMEd: toolsOpenSSL-Win32setPATH % OPENSSL_HOME %
sameCheck the validity period of a certificateCheck if the certificate has been revokedThe PKI consists of the following and parts:CA: Visa authoritiesRA: Registration AuthorityCRL: Certificate revocation ListCertificate Access LibraryCA is the core of PKI, responsible for issuing, certification, management has issued certificates;The current Universal Certificate format standard is zero , which defines the certificate structure and the authentication protocol standard:the Certification Agreeme
operation process:
Certificate directory:/ETC/PKI/CA
To create a private CA using OpenSSL:
Generate private key
When you use the private key to sign a certificate, you add a digital signature to the certificate
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/
request to make response packets and record the logs.9. The client and server are disconnected by four waves over TCP, and the communication is complete.
5. Create a CA Certificate Signing Server
(1) Ca servers
1. Generate a key pair
650) This. width = 650; "Title =" ca1.png "src =" http://s3.51cto.com/wyfs02/M02/43/D7/wKioL1PdycXBFBx2AACo2vQBxBE179.jpg "alt ="
This article mainly draws on and references the following 2 address content, then carries on the test and the execution on own machine, and has made the following record.RefHttp://blog.chinaunix.net/uid-26760055-id-3128132.htmlhttp://www.111cn.net/sys/linux/61591.htmCreate a Test CatalogMkdir/tmp/create_key/caCD /tmp/create_key/ certificate file generation:one. Server-side1. Generate the server-side private key (key file);OpenSSL genrsa-des3-out serve
(country code needs to be modified by yourself)CountryName_min = 2CountryName_max = 2StateOrProvinceName = State or Province Name (full name)StateOrProvinceName_default = Hebei (the State or province name must be modified by yourself)LocalityName = Locality Name (eg, city)LocalityName_default = Beijing (the location name must be modified by yourself)0. organizationName = Organization Name (eg, company)0. organizationName_default = Tianli Company (the organization or Company name must be modifie
Encryption, decryption, and OpenSSL private CA
I. Common Algorithms
Common encryption algorithms and protocols include symmetric encryption, asymmetric encryption, and one-way encryption.
1. symmetric encryption: one key is used for encryption and decryption. algorithms can be made public and keys cannot be public, because encryption relies on keys. Security depends on keys rather than algorithms;
Common al
encryption library;Libssl: library, the implementation of SSL and TLS;The OpenSSL command on Linux uses:1.enc command:Encryption: ~]# OpenSSL enc-e-des3-a-salt-in fstab-out fstab.ciphertextDecryption: ~]# OpenSSL enc-d-des3-a-salt-in fstab.ciphertext-out fstabOpenSSL? can get help2. One-way encryption:Tools: Md5sum, Sha1sum, Sha224sum, sha256sum,...,
0. EnvironmentInstallation of Nginx, installation of OpenSSL1. Configuration and scriptingFirst create a demo directory (the location of their own choice, I choose to build in the Nginx directory):mkdir /etc/nginx/ca-/etc/nginx/ca-demoModify the SSL configuration openssl.cnf (also may be openssl.conf, do not know where to find with FIND-NAME/OPENSSL.CNF)Change th
-text-in SERVER.CRT//view private certificate Content Text format/ETC/PKI/TLS/OPENSSL.CNF OpenSSL configuration fileDir indicates the CA working directory/etc/pki/caCerts Client Certificate Save directoryCRL Certificate Revocation List DirectoryDatabase certificate to save databasesNew_certs_dir the newly generated certificate save pathCertificate's own certificate fileSerial Certificate serial Number fileC
:$1$FY6Z3QXZ$GWSUDSUP92DY.MRRDBTKM0 2 $ to 3 $ between the characters for ' salt ' [[email protected] tmp]# OpenSSL passwd-1-saltfy6z3qxz (-salt designation ' salt ')Password:$1$FY6Z3QXZ$GWSUDSUP92DY.MRRDBTKM0 (same password and same cipher string generated by the same salt)[Email protected] tmp]#Openssl? the option to view OpenSSLRsautl :RSA Encryption and decryption tool[Email protected] tmp]# Whatis Ra
How does OpenSSL implement private CA.
NOTE 1: The blue part is the main process, and the yellow arrow points to the specific operation steps.
What is OpenSSL?
1. A security protocol that provides security and data integrity for network communication, including key algorithms, common key and certificate encapsulation management functions, and SSL protocols, and
encryption features:
Fixed-length output: No matter how big the raw data is, the results are of the same size.
Avalanche effect: small changes in input will cause huge changes in results
One-way encryption algorithms: MD5 (128 bits), sha1, sha256, sha384, and sha512
Iii. encryption process and principles
Iv. self-built private CA process
A
① Generate a key
[[Email protected] ~] # (Umask 077; OpenSSL genr
OpenSSL provides a powerful feature in this area, and is open source, now widely used in the network communication mechanism;3. By deploying a CA (Certificate authority) server within a certain scope, the certificate authentication and authorization can be realized in the LAN, and the security of data transmission can be ensured, and the working principle of the international large
. The technology of digital certificate authentication based on CA Visa institution is the way to solve public key issue. The following is a private CA certificate production distribution process to illustrate the specific process of digital certificate certification:On the service side:# (Umask 077;openssl genrsa-out/etc/pki/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.