虫言虫语 虫言虫语

本地自签证书测试https

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

参考文章: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

支付宝打赏

文章二维码

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

发表新评论
已有 18427 条评论
  1. JaneDes
    JaneDes
    回复

    order ventolin online

  2. JackDes
    JackDes
    回复

    tadalafil 600 mg cialis 2.5 mg price comparison cost of celexa 20 mg

  3. legitimate canadian mail order pharmacies

    best canadian pharcharmy online
    http://canadiannextpharmacy.com/
    canadian internet pharmacy

  4. cialifS
    cialifS
    回复

    [url=https://cialisgf.com/]cialis online daily[/url] cialis polyneuropathie

  5. Johnnykance
    Johnnykance
    回复

    Hello dear,Winning baccarat system !!! 100% Deposit Match up to $300 !!!
    Play for free are entirely riskfree so the gamblers can kill time and not lose. https://www.hotnewsindia.com/rupnagar-mission-fathe/#comment-3104853
    Do US online has changed and best way to Hit Platinum is. http://www.dqzivip.com/home.php?mod=space&uid=142500 .
    Enjoy casino slot from NetEnt casino with feeling of This gaming machine have been playing. http://www.tipstotricks.com/hp-gas-online-booking-and-payment-by-credit-debit-card-via-mobile-app/?unapproved=608288&moderation-hash=52ba93f29fc3261e1f42fa50e9b554d9#comment-608288
    Slot that require Download : these prosecute individuals who and feel as as they often meaning the average Swiss player has deviations from the. https://ci.clemson.edu/blogs/qcr/2017/03/05/lets-see-how-far-weve-come/?unapproved=99895&moderation-hash=54fa13dcb874a11b64dbc28253235300#comment-99895
    These casino software casinos for American requires a player verification, then you casino games that operators wish to purchase and offer. http://www.toaikhanh.com/ht/member.php?action=profile&uid=44 .
    They include not only more reels need to find in most instances, rather rewarding features, not their fault. http://kinomozg.club/topic/63-domen-s-istoriey/#comment-36577
    Common issues with to free bonuses USA casinos relate to some real withdrawal times, and all online casino preoccupy players who in the eye of the casino. http://www.betriebsraum.de/blog/2009/07/21/efficient-gesture-recognition-and-corner-finding-in-as3/comment-page-1/?unapproved=7795994&moderation-hash=e6014425b3fa5ce49ea915afa3bf236c#comment-7795994
    Cool Cat Casino will expire after 30 days of to lose per. http://bbs.taozuigc.com/home.php?mod=space&uid=52987 .
    Just click below It allowed mobile machine payback statistics download games as the maximum bet. http://labrujitaotaku.com/foro/member.php?action=profile&uid=65163
    In fact, many casinos offer a demo mode version of the majority of their slots in order to allow players the chance to test out the feel and style of the game prior to actually putting any money into. https://inizioart.com/art-organizations/ganges-art-gallery/#comment-195897
    In other words, list will be about Interac is casinos and games with over banks. http://www.mattgerry.co.uk/Forum/member.php?action=profile&uid=580 .
    There will be have a prison the right place 1 and win enter the prison premises, you will get wanted level in one run. http://chinacar.kiev.ua/drugie-kitaiskie-avto/3387-forum-members-exclusivley-1759.html#post147694
    https://bit.ly/36KztAu http://bit.ly/3pA2y89 https://bit.ly/3304VZ5
    https://oinkura2024folimaser.blogspot.com/

  6. cialifS
    cialifS
    回复

    buy cialis in miami cialis viagra levitra which is best

  7. KimDes
    KimDes
    回复

    price of celebrex 200 mg in south africa

  8. JackDes
    JackDes
    回复

    atenolol 100 can you buy generic viagra in canada buy phenergan no prescription cialis for sale india allopurinol 300 mg price bupropion cheap generic cialis 20mg cost canada

  9. AnnaDes
    AnnaDes
    回复

    viagra united states sildenafil daily zithromax uk bactrim ds generic viagra for female online cialis canada 40mg

  10. JimDes
    JimDes
    回复

    where to buy cheap viagra in canada celebrex 250 mg where can i buy viagra over the counter canada

  11. canadian pharmacy

    online pharmacy
    http://bambulapharmacy.com/

  12. cializS
    cializS
    回复

    [url=https://5cialismg.com/]cialis 20mg for sale[/url] cialis for rsd

  13. JaneDes
    JaneDes
    回复

    sildenafil drug

  14. viagra cheapest price vqljso

    walmart rx prices viagra pills viagra soft
    viagra shelf life cvs pharmacy

  15. SamDes
    SamDes
    回复

    www canadapharmacy com order amoxicillin 500mg 2500 mg metformin buy generic cialis 10mg how to get clomid

  16. JamesEsorn
    JamesEsorn
    回复

    buy prescription viagra online without buy generic viagra
    over the counter ed medication http://genericvgrshop.com meds without a doctor prescription
    buy generic viagra here buy prescription viagra online without

  17. cialifS
    cialifS
    回复

    buy cialis in miami buy cialis online ireland

  18. reliable mexican pharmacies

    canadian pharmacy
    http://canadianfastpharmacy.com/
    aarp recommended canadian online pharmacies

  19. EvaDes
    EvaDes
    回复

    where to buy arimidex in canada

  20. EvaDes
    EvaDes
    回复

    dapoxetine tablet buy online

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