虫言虫语 虫言虫语

本地自签证书测试https

in 默认分类read (9606) 文章转载请注明来源!

参考文章:https://www.2cto.com/article/201510/444706.html
生成密钥、证书
第一步,为服务器端和客户端准备公钥、私钥

生成服务器端私钥 openssl genrsa -out server.key 1024

生成服务器端公钥 openssl rsa -in server.key -pubout -out server.pem

生成客户端私钥 openssl genrsa -out client.key 1024

生成客户端公钥 openssl rsa -in client.key -pubout -out client.pem 第二步,生成 CA 证书

生成 CA 私钥 openssl genrsa -out ca.key 1024

X.509 Certificate Signing Request (CSR) Management. openssl req -new -key ca.key -out ca.csr

X.509 Certificate Data Management. openssl x509 -req -in ca.csr -signkey ca.key -out ca.crt 在执行第二步时会出现:

➜ keys openssl req -new -key ca.key -out ca.csr You are about to be
asked to enter information that will be incorporated into your
certificate request. What you are about to enter is what is called a
Distinguished Name or a DN. There are quite a few fields but you can
leave some blank For some fields there will be a default value, If you
enter '.', the field will be left blank.
----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:Zhejiang Locality Name (eg, city) []:Hangzhou
Organization Name (eg, company) [Internet Widgits Pty Ltd]:My CA
Organizational Unit Name (eg, section) []: Common Name (e.g. server
FQDN or YOUR name) []:localhost Email Address []:

注意,这里的 Organization Name (eg, company) [Internet Widgits Pty Ltd]: 后面生成客户端和服务器端证书的时候也需要填写,不要写成一样的!!!可以随意写如:My CA, My Server, My Client。

然后 Common Name (e.g. server FQDN or YOUR name) []: 这一项,是最后可以访问的域名,我这里为了方便测试,写成 localhost ,如果是为了给我的网站生成证书,需要写成 barretlee.com 。

第三步,生成服务器端证书和客户端证书

服务器端需要向 CA 机构申请签名证书,在申请签名证书之前依然是创建自己的 CSR 文件 openssl req -new -key server.key -out server.csr

向自己的 CA 机构申请证书,签名过程需要 CA 的证书和私钥参与,最终颁发一个带有 CA 签名的证书 openssl x509 -req -CA ca.crt -CAkey ca.key -CAcreateserial -in server.csr -out server.crt

client 端 openssl req -new -key client.key -out client.csr

client 端到 CA 签名 openssl x509 -req -CA ca.crt -CAkey ca.key -CAcreateserial -in client.csr -out client.crt

jrotty WeChat Pay

微信打赏

jrotty Alipay

支付宝打赏

文章二维码

扫描二维码,在手机上阅读!

发表新评论 取消回复
已有 2795 条评论
  1. JordanLex
    JordanLex
    回复

    where to bay cialis (tadalafil) pills 80mg 5mg cialis
    herbal replacement for viagra/cialis/levitra...

  2. crapyragacoup

    credit scores chart http://creditcheckweb.com/ yearly free credit report my credit score annual credit score

  3. KevinCub
    KevinCub
    回复

    online cialis how long does 20mg cialis keep in system
    http://tadalafilprof.com cialis dosages

  4. Amitsflormror

    annualcreditreport com official website http://checkcreditps.com/ - intuit credit score get credit report credit check what is a great credit score

  5. MarcusCop
    MarcusCop
    回复

    viagra vs cialis how to take cialis
    http://tadalafilprof.com take cialis with or without food
    best liquid cialis side effects of cialis prices of cialis

  6. Frankstync
    Frankstync
    回复

    cheap kamagra/viagra
    http://tadalafilprof.com legitimate cialis by mail

  7. smagmevagype
    smagmevagype
    回复

    what is a good credit score how to get a free credit report credit score companies equifax credit score http://checkcredithistorynx.com/ - how to get credit report

  8. JordanLex
    JordanLex
    回复

    30ml liquid cialis cialis free trial
    how to get cialis samples

  9. jspbured
    jspbured
    回复

    In addition to reasonably-priced medicines and preparations delivered directly from credible manufacturers, you are granted with various promotions from VIP discounts to flexible bonus programs on certain lines of goods.The simultaneous use of sildenafil in an equilibrium state of 80 mg 3 times a day leads to an increase in AUC and C max of Bosentan 125 mg 2 times a day by 49.8 and 42 respectively.Viagra is a tablet medication used to treat men with erectile dysfunction.is viagra prescription Only registered users can see links.If it s tender on the bottom, you may have bent your. buy viagra In supermarkets ABC taste came up with a new format concierge service, which allows the buyer to make an order directly through the seller.Believe or not, some in the health community has considered watermelon as a natural Viagra.In fact, the numbers are very different.Generic viagra comes in various strengths like generic viagra 100mg, 50mg, 25mg, 150mg, 200mg.The big takeaway here is that phosphodiesterase 5 inhibitors PDE5 inhibitors are an effective therapeutic class for treating the symptoms of ED and that ED may not be a natural part of aging, but rather a medical condition that can and should be addressed clinically. viagra online Since there is such an interest in this topic I ve put together this page to help the millions of men who are curious about buying erectile dysfunction drugs online.And while she s pretty much always stayed out of the sun and taken care of her skin in that regard, it s the shifts in her wellness and beauty routine she began making in her 30s that she credits for her epic youth preservation my words, not hers, of course.How much does Viagra cost?Blown upward by the blast of air, the tea leaves soar upward about 6m 19.Bernadot recommended a protracted war. https://pharm-usa-official.com - viagra online We are independently owned and the opinions expressed here are our own.At Chemist-4-U we aim to provide a reliable pharmacy service which is quick and discrete, offering people suffering from a range of potentially embarrassing conditions with fast and effective relief from their symptoms.Viagra is probably the best world-known pill used to generate erection when needed.Buy with delivery of Vizarsin analogue 100 mg 4 tablets 876.The main effects and properties of Viagra for men are the following.

  10. crapyragacoup

    full credit report http://creditcheckweb.com/ - how to improve my credit score free credit score report request credit report credit report companies

  11. KevinCub
    KevinCub
    回复

    cialis tadalafil 20 mg cialis 30 day trial voucher
    http://tadalafilprof.com coffee with cialis

  12. Amitsflormror

    check credit rating http://checkcreditps.com/ - dispute credit report free credit report experian how to get a credit report

  13. KevinCub
    KevinCub
    回复

    cialis before and after lowest price cialis
    http://tadalafilprof.com purchasing cialis on the internet

  14. Frankstync
    Frankstync
    回复

    buy cialis canada pharmacy
    http://tadalafilprof.com prices of cialis

  15. smagmevagype
    smagmevagype
    回复

    http://checkcredithistorynx.com/ check my credit score credit karma http://checkcredithistorynx.com/ - free credit report online credit score range

  16. JordanLex
    JordanLex
    回复

    generic cialis at walmart hard erections cialis
    cialis without doctor prescription

  17. MarcusCop
    MarcusCop
    回复

    coffee with cialis cialis daily
    http://tadalafilprof.com cialis online pharmacy
    viagra or cialis purchasing cialis on the internet buy viagra cialis

  18. crapyragacoup

    how to check your credit score http://creditcheckweb.com/ - credit score rating credit score credit karma uk business credit score

  19. swimarumTauff

    does forbearance affect credit score experian credit experian credit turbotax credit report http://creditcheckmax.com/ - credit karma com free credit score

  20. KevinCub
    KevinCub
    回复

    30 day cialis trial offer cialis without doctor prescription
    http://tadalafilprof.com cialis 30 day sample

博客已萌萌哒运行
© 2020 由 Typecho 强力驱动.Theme by Yodu
前篇 后篇
雷姆
拉姆