虫言虫语 虫言虫语

本地自签证书测试https

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

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

支付宝打赏

文章二维码

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

发表新评论
已有 3256 条评论
  1. IvyDes
    IvyDes
    回复

    buy cheap seroquel prazosin cost prednisolone 40mg arimidex online uk buy tadalafil 20mg avana 522 finasteride cream buy singulair no prescription flagyl gabapentin online usa nolvadex tamoxifen buy proscar 1mg cost of advair prescription anafranil price in us cheap zithromax online amoxicillin 400 mg coupon propecia online no prescription dapoxetine uk buy online zoloft price 50 mg can i buy vermox over the counter

  2. EldenDetly
    EldenDetly
    回复

    paxil ocd paxil drug paxil for ocd http://paxil100.com/ paxil bipolar paxil 60 mg paxil anxiety wellbutrin order online wellbutrin 30 mg wellbutrin brand price http://wellbutrin100.com/ purchase wellbutrin in canada wellbutrin xr buy wellbutrin cheap valtrex generic cheap how to order valtrex online valtrex medicine for sale http://valtrex10.com/ where to buy valtrex 2000 mg valtrex daily buy generic valtrex online canada

  3. JimDes
    JimDes
    回复

    order accutane from canada prazosin drug malegra 150 albenza medication

  4. IvyDes
    IvyDes
    回复

    sildalis paxil drug cost viagra 88 phenergan cost where to purchase xenical fluoxetine dr buy gabapentin 800 generic tadalafil 20mg uk propranolol mexico singulair for chronic hives buy dipyridamole triamterene 37.5 mg hctz 25mg caps antabuse price in india 750 mg trazodone clomid prices in south africa azithromycin generic pharmacy flagyl furosemide tab 80 mg cost of advair without insurance nolvadex tablet

  5. EldenDetly
    EldenDetly
    回复

    cheap wellbutrin online best generic wellbutrin wellbutrin cost uk http://wellbutrin100.com/ can i buy wellbutrin online buy wellbutrin wellbutrin prescription uk buy wellbutrin from canada where to buy wellbutrin online online wellbutrin http://wellbutrin100.com/ wellbutrin 150 mg discount buy generic wellbutrin buy generic wellbutrin online valtrex medication cost buy valtrex over the counter price of medicine valtrex http://valtrex10.com/ purchase valtrex online buy generic valtrex on line cheap valtrex for sale

  6. IvyDes
    IvyDes
    回复

    generic flagyl online avodart tab price order cleocin online how to get tetracycline albendazole 200 mg price prednisone 5092 ivermectin brand name diflucan uk seroquel sleep apnea losartan hydrochlorothiazide cheap prednisolone uk albenza 200 mg price sumycin drug proscar best price ventolin 4 mg tablets trazodone generic price amoxil 400 mg buspar 10mg price propranolol where to get where can i buy finasteride

  7. JaneDes
    JaneDes
    回复

    tadalafil online no prescription

  8. JaneDes
    JaneDes
    回复

    ildenafil citrate

  9. EldenDetly
    EldenDetly
    回复

    finesterude no prescription propecia tablets propecia prescription online http://propeciafavdr.com/ propecia buy online propecia without prescription generic propecia prescription where to get valtrex valtrex online no prescription where can you purchase valtrex http://valtrex10.com/ online valtrex prescription where can i order valtrex valtrex pills over the counter paxil paxil 10 mg paxil http://paxil100.com/ paxil 30 mg paxil for depression paxil flu

  10. JosephFus
    JosephFus
    回复

    diflucan cap 150 mg diflucan 150mg tab diflucan 110 mg http://diflucanfavdr.com/ diflucan 1 pill diflucan online prescription diflucan pill over the counter
    propecia.com propecia generic no prescription buy propecia no prescription http://propeciafavdr.com/ propecia 5 mg buy propecia no prescription cost of propecia
    diflucan over the counter diflucan pill otc buy diflucan otc http://diflucanfavdr.com/ over the counter diflucan pill generic for diflucan diflucan 150 australia

  11. RonaldCab
    RonaldCab
    回复

    wellbutrin prescription wellbutrin 300 mg no prescription online wellbutrin prescription cost http://wellbutrin100.com/ wellbutrin 150mg price wellbutrin xl generic wellbutrin 200 mg
    paxil ocd paxil for anxiety cost of paxil http://paxil100.com/ paxil 30 mg 20 mg paxil paxil cr generic
    prescription for valtrex price of valtrex without insurance valtrex medication cost http://valtrex10.com/ buy generic valtrex cheap valtrex australia buy valtrex rx

  12. JoeDes
    JoeDes
    回复

    ivermectin malaria strattera generic in south africa generic trazodone finasteride 1mg over the counter buy priligy canada gabapentin 100mg price uk

  13. EldenDetly
    EldenDetly
    回复

    wellbutrin 450 mg wellbutrin xl 150mg wellbutrin xl http://wellbutrin100.com/ wellbutrin cost generic for wellbutrin wellbutrin valtrex buy over the counter valtrex cream buy valtrex http://valtrex10.com/ where can i buy generic valtrex valtrex 500mg coupon valtrex order uk can i purchase diflucan over the counter diflucan cap 150 mg where to buy diflucan http://diflucanfavdr.com/ diflucan over the counter singapore diflucan fluconazole diflucan otc canada

  14. AlanDes
    AlanDes
    回复

    robaxin 1050 mg paxil for dogs strattera prescription cost buy sumycin dapoxetine 30 mg in india seroquel tablets 200mg bactrim 480mg amoxil 250 triamterene/hctz 37.5 zoloft 100 where can you get diflucan over the counter buy albendazole over the counter generic flagyl cost cymbalta 25 mg stromectol tab generic tadalafil south africa can you buy antabuse over the counter how to buy glucophage clonidine generic brand 50 mg indocin

  15. SueDes
    SueDes
    回复

    generic fluoxetine genuine kamagra best prices acyclovir prescription online us where can i buy amoxicillin over the counter azithromycin 1000mg buy buspar 5 mg cephalexin keflex 500 mg 80 mg lexapro zithromax 3 capsules seroquel uk

  16. Donaldbrids
    Donaldbrids
    回复

    propecia .5 mg finasteride 5 mg propecia prescription online http://propeciafavdr.com/ propecia prescription propecia pill buy generic propecia
    generic diflucan otc diflucan 100 diflucan 150 mg over the counter http://diflucanfavdr.com/ diflucan 150 mg caps diflucan order online uk where can i buy diflucan without prescription
    paxil 5 mg paxil depression paxil flu http://paxil100.com/ paxil hair loss paxil 20 mg paxil insomnia

  17. AmyDes
    AmyDes
    回复

    ampicillin 500 tablet

  18. JoeDes
    JoeDes
    回复

    cymbalta price comparison cheapest plaquenil amoxicillin otc uk 1 mg proscar price motilium tablets price albenza albendazole inderal 80 mg prices

  19. DenDes
    DenDes
    回复

    prednisone 40 mg tablet order wellbutrin online india generic valtrex cost flagyl 400mg tablets ivermectin 0.5 lotion india

  20. EldenDetly
    EldenDetly
    回复

    how to get diflucan diflucan 200 mg cost buy diflucan cheap http://diflucanfavdr.com/ diflucan 150 mg tablet price diflucan 1 where to buy diflucan for sale online how much is a valtrex prescription cheap valtrex for sale valtrex prices canada http://valtrex10.com/ valtrex 500 india valtrex medication cost valtrex coupon canada valtrex 500mg coupon price of valtrex without insurance order generic valtrex online http://valtrex10.com/ valtrex brand name price over the counter valtrex cream otc valtrex for sale

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