- Cloud Native programming with Golang
- Mina Andrawos Martin Helmich
- 440字
- 2021-07-02 20:03:45
OpenSSL
One of such specialized tools that can generate a TLS digital certificate and is very popular is called OpenSSL. OpenSSL can be found at: https://www.openssl.org/. OpenSSL is an open source commercial grade TLS toolkit that can be used to perform a variety of tasks; among them is to generate self-signed digital certificates. The OpenSSL organization by itself does not provide prebuilt binaries for the tool. However, there is a wiki page that lists third-party places where a binary can be downloaded for the tool. The wiki page can be found at: https://wiki.openssl.org/index.php/Binaries. Once you have the tool downloaded, here is an example of how to make use of it to generate a digital certificate in addition to its private key:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
The first word in the preceding code is obviously the name of the binary. Let's cover the arguments one by one:
- req: Stands for the request; it indicates that we request a certificate.
- -x509: This will indicate that we want to output a self-signed certificate. In the world of cryptography, the notion X.509 is a standard that defines the format of public key certificates. Digital certificates used in many internet protocols utilize this standard.
- -newkey: This option indicates that we would like a new certificate with a paired private key. As mentioned before, a certificate is nothing but a public key combined with a bunch of identifiers. So, to perform asymmetric cryptography, we will need a private key paired with this public key.
- rsa:2048: This is an argument to the -newkey option, indicating the type of encryption algorithm that we would like to use for generating the key.
- -keyout: This option provides the filename to write the newly created private key to.
- key.pem: This is the argument to the -keyout option. It indicates that we would like the private key to be stored in a file called key.pem. This key needs to be kept private and not shared with anyone, as mentioned earlier.
- -out: This option provides the filename to write the newly created self-signed certificate to.
- cert.pem: This is the argument to the -out option; it indicates that we would like to save the certificate in a file called cert.pem. This certificate can then be shared with web clients attempting to communicate securely with our web server in order to invoke HTTPS.
- -days: The number of days that the certificate should be valid for.
- 365: This is the argument for the -days option. It is simply us saying that we would like the certificate to be valid for 365 days, or simply one year.
- 密碼之謎
- 網(wǎng)絡(luò)時(shí)代的電信監(jiān)管
- 5G技術(shù)與應(yīng)用
- 5G社會:從“見字如面”到“萬物互聯(lián)”
- 路由器/交換機(jī)項(xiàng)目實(shí)訓(xùn)教程
- 嵌入式Linux網(wǎng)絡(luò)體系結(jié)構(gòu)設(shè)計(jì)與TCP/IP協(xié)議棧
- 5G無線系統(tǒng)設(shè)計(jì)與國際標(biāo)準(zhǔn)
- 5G網(wǎng)絡(luò)技術(shù)與規(guī)劃設(shè)計(jì)基礎(chǔ)
- 天地一體化信息網(wǎng)絡(luò)通信服務(wù)技術(shù)
- 3D顯示技術(shù)、標(biāo)準(zhǔn)與應(yīng)用
- 6G需求與愿景(精裝版)
- 電子元器件檢修與應(yīng)用
- 現(xiàn)代移動通信(第4版)
- 新型手機(jī)原理與維修
- 非平穩(wěn)信號處理方法與應(yīng)用研究