官术网_书友最值得收藏!

Getting ready

To install an SSL, there are three components we need to start with. The first is Certificate Signing Request (CSR). This defines the information which will be contained within the certificate and includes things such as the organization name and domain name. The CSR is then sent to a CA or used to generate a self-signed certificate.

To make it easy for this recipe, we'll use a self-signed certificate. We can easily generate the CSR and then the private key and public certificate with one command. For example, here's how to generate a CSR with a 2048 bit key and 600 day expiry:

openssl req -x509 -new -newkey rsa:2048 -nodes -keyout private.key -out public.pem -days 600  

This example will ask a series of questions for the CSR and then automatically generate the private key (private.key) and the public certificate (public.pem). Consider the following example:

Self-signed certificates aren't validated by browsers and are not intended for production. They should be used for internal and testing purposes only.
主站蜘蛛池模板: 拉萨市| 井研县| 湘乡市| 海晏县| 岢岚县| 呼图壁县| 北票市| 通榆县| 阿尔山市| 休宁县| 绩溪县| 香河县| 白玉县| 内黄县| 彭州市| 金溪县| 蒙城县| 怀来县| 张家口市| 青河县| 临高县| 上虞市| 吐鲁番市| 抚顺市| 无棣县| 两当县| 松溪县| 拜城县| 临泉县| 田林县| 乌鲁木齐县| 麟游县| 尚义县| 叙永县| 额尔古纳市| 兴业县| 长治县| 南安市| 驻马店市| 濮阳县| 高唐县|