虫言虫语 虫言虫语

本地自签证书测试https

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

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

    http://cbd-hemp.us.com/ hemp cbd http://cbd-hemp.us.com/ - medterra cbd hemp oil

  2. smagmevagype
    smagmevagype
    回复

    http://cbd-online.us.com/ cbd vape http://cbd-online.us.com/ - cbd oil at walmart cdb oils

  3. KevinCub
    KevinCub
    回复

    5mg cialis cialis 20 image
    http://tadalafilprof.com cialis headaches afterwards

  4. Frankstync
    Frankstync
    回复

    where to buy cialis online in uk
    http://tadalafilprof.com cialis 20 mg

  5. JordanLex
    JordanLex
    回复

    cialis or viagra real cialis without a doctor prescription
    30 day cialis trial offer

  6. crapyragacoup

    cbd pure cbd online cbd oil at walmart cbd capsules

  7. swimarumTauff

    hemp oil cbd oil online best cbd oil

  8. waamured
    waamured
    回复

    The price at retail of brand-name Viagra can be 60 or even 80 a pill; the generic can be much less, like 35.Even a small dose of alcohol will negatively affect the body.Speak with your doctor if you take any of the following.Share on Pinterest Viagra treats erectile dysfunction by improving blood flow to the penis.The guys tested the following drugs dynamicso, alycapse, saima, sildenafil-C3, Viagra. viagra generic Larger individuals taking a standard dose or one that isn t increased to reflect their above-average weight are equipped with a bigger system for efficient elimination.Although rare, Viagra may also cause vision changes whereas Cialis does not.In an overdose of Viagra can be noticed after a while mild headache, runny nose, digestive problems, weakened visual acuity.More common blood hot flashes to the face, headache, dizziness, visual impairment, nasal congestion, dyspepsia.As with prescribed Viagra, the active ingredient in Viagra Connect is sildenafil. viagra 100mg Examples of drugs used to treat high blood pressure include.Pfizer also offers significant savings, up to 50 off, for the brand name product.Generic Cialis 20 mg Tadalafil 20 mg.The price of one dynamic tablet is 200-300 rubles.And cut out the burn, his name on the wrist. https://pharm-usa-official.com - viagra online The medicine can be taken on an empty stomach or during meals.To help other readers get an understanding of your Xanax use, share some details including Xanax format e.Please share your positive and negative experiences with the drug, and compare it with other treatments you have used.Trusted medical facilitators aren t afraid of questions.Welcome.

  9. KevinCub
    KevinCub
    回复

    coupons for cialis coffee with cialis
    http://tadalafilprof.com cialis and interaction with ibutinib

  10. MarcusCop
    MarcusCop
    回复

    how does cialis work hard erections cialis
    http://tadalafilprof.com cialis dosage
    generic cialis tadalafil free cialis medication for providers generic cialis available

  11. smagmevagype
    smagmevagype
    回复

    cbd oil for pain http://cbd-online.us.com/ - cbd oil online cbd oil benefits cbd drops buy hemp oil

  12. Frankstync
    Frankstync
    回复

    buy viagra from canada online
    http://tadalafilprof.com fastest delivery of cialis buying online

  13. JordanLex
    JordanLex
    回复

    warnings for cialis cialis coupon code
    5mg cialis

  14. swimarumTauff

    http://cbd-oils.us.com/ cbd cream http://cbd-oils.us.com/ - cbd capsules cbd near me

  15. KevinCub
    KevinCub
    回复

    generic for cialis how often to take 10mg cialis
    http://tadalafilprof.com buy cialis online canadian

  16. Razobete
    Razobete
    回复

    buy cialischeap cialiscialis onlinecialiscialiscialiscialisbuy cialischeap viagraviagra onlineviagra onlinecheap viagracheap cialisbuy cialiscialiscialis onlinebuy viagrabuy viagra

  17. Amitsflormror

    freeze credit report http://checkcreditps.com/ how to read a credit report check credit score free credit report online

  18. KevinCub
    KevinCub
    回复

    generic cialis coming out nose congested when taking cialis
    http://tadalafilprof.com tadalafil vs cialis

  19. Kirsanobete
    Kirsanobete
    回复

    https://nagoriknewsbd.com/?p=34443&unapproved=9201&moderation-hash=d96cc316483923b6b462fd2c0df3d2e7 - viagrabuy viagrahttps://www.second-glance.fr/2017/03/03/le-deep-learning-3-notre-premier-reseau-neuronal/?unapproved=45220&moderation-hash=53fe385d769d24c19adea10f6f6a5efa - cheap viagrabuy viagrahttps://hayyaahere.com/forest-hills-tala-weekend-gateway-review/?unapproved=8644&moderation-hash=6207ddb49f920295e525996da59e1d07 - viagraviagra onlinehttps://www.closedwon.ai/sales-prospecting/are-your-sales-prospecting-efforts-omni-nurture/?unapproved=18953&moderation-hash=5459712deb85af6f418e91ecea17f7e1 - buy cialischeap cialishttps://www.AnnaKarenIna-Movie.com/games/what-is-the-advantage-of-a-free-lottery-system.html?unapproved=3723&moderation-hash=2543ec7d1acf664d3759eb62e366dda7 - viagraviagra onlinehttps://thrilledsports.com/2020/05/03/safety-of-bouldering/?unapproved=445&moderation-hash=54072717b62cc1901bdf74c5e23c1be0 - cheap cialisbuy cialishttps://wpthemeblog.com/8-buoc-lam-mot-website-bang-wordpress-de-dang/?unapproved=15949&moderation-hash=4f6ca9808704bd139c5e6cb68cd2e911 - cheap cialiscialis onlinehttp://blog.bytemem.com/post/what-is-anony-memory?unapproved=115&moderation-hash=ef30231ccade53cc38fa18a9758d2312 - viagraviagra

  20. Frankstync
    Frankstync
    回复

    buy genuine cialis
    http://tadalafilprof.com generic cialis at walmart

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