zoukankan      html  css  js  c++  java
  • 对于https ssl中的pem文件和key 文件的理解

    pem和key 这两种格式 分别存储的是证书base64加密和私钥base64加密还有格式分割符,也就是说pem存的是证书,key 存的是私钥

    这两个文件我们都可以打开看一下

    如pem中的内容:

    -----BEGIN CERTIFICATE-----
    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
    -----END CERTIFICATE-----

    -----BEGIN CERTIFICATE----- 和 -----END CERTIFICATE----- 为分割分,表示在这两个中间存的是证书的base64编码

    备注:CERTIFICATE 单词代表证书的意思。

    如key中的内容:

    -----BEGIN RSA PRIVATE KEY-----
    MIIEowIBAAKCAQEAgrLlC/eVrWt6Z835BWLvySC629eV5qB+LbksHPFDIaLnTys8
    X76t0wkQg2PScTRNsLySfsSWvFncKoFzW/1cZeXPUWoCs5fQNmA+fTbIGArerTGj
    sDbAHSwcBDkCvmexWuAAc1SuRJl6CXGOl+v/3fw+KsKAbjwN8sQJb+MwtZ/lr+C5
    5Ls4iqCF5DjQbm6nkSeOZs22Agyi8QRLNkOBWTr/SNqN5+QjjSt1A5mMJm5E8/bV
    sGq/T//Lnb8dVJ9FLY4YrFA7hfVHDWXKCwMiSZ1cbxImXO3Nh5ulg81ybKsRfXLm
    L+E5pIBnNa14qljFqiiG1tC0GI9tcDDExDODnQIDAQABAoIBACHC1lnGBbr7VW41
    DYtvqCMbOkmJoeYmNRHYkGWViNLKgte3gmv1FG+8GrDl+zlU2nC59VmbrJhQ2gd8
    0vDDPLfxqiEMsk/z+kvhhqLPoNZdEHJKrU7ahbvDZiVNGMFYhb7EuDkSecWso5KG
    69+gjcKo4uImxggzqSK5svpdBHsVx/6Ml6Y3sFTdnrwkMmpa8xESHIdTizYFrCh5
    GyKlLwXFtWmyH7vqBqi8D1XcXF7Z7yAjzHUpe94aVwHPGlDYicQNPKzijoaiJvWg
    YX/D0w8gpJPcACI3pc83gA0UTRXgZiG+gYee5PbT0zomcaeG3NJpi4jQJdw6RXqw
    bhX/JCECgYEA1yZhRfVtVpRknjPSUSgGYRooBuCxsUA6Z7o7PnhaBOaVFJ4ssiFD
    4WXmIpF7gZwKXbRTgUyJABwkVFxO03Vsytl/FIVPLajFaLOxPAf92+PPjzOV24YX
    5DElmXmuzsERGwXFmGgAs5bmBQxAAfoZ7jMpt3HU7z4jOt5UozBmaxUCgYEAm4Oq
    wlw5BWodTd80NUo6SG4t6iCva2WEtptu6d/Tab4cYSQtFp1sGBKSsz4lz3Svg3j/
    L8fLK1iZvnpXSkAtOKUJbNroJFzWJBDrBa9Yhi7TLKjao3Nhstr0idC9108nRwzk
    GgvrZxKJOBukLYs78rXh0nV0w83assJnHuTxOGkCgYEAvo+o8qzp9hijchhWPTml
    RNZFA6p62JMZ6AvkM3WnzdVp0AQ1dGTQWdDGYHHZIbhS2iJBIDHo2mcSqoHD87l6
    7cRssYFN2xQ0HYOjBJfTerKxgZXgMrr3aE87jU9gzJHmk7euB0p+7JJIE8qA2v9p
    fjhkx62UO38e9yI7dvsEi+0CgYADLp2G3pY4GyTAXCnYUU2B/+cmnEaanvgpOGL7
    nB3aUw6HmlLl3JDCqVahHkttxEh3Gzm1g5QPrf9vW1d/6HJEb3QS6yPG4rNrB4GX
    my/nhvvBNS9MGudL3pkUXNYVmsQF+yiLs+S8Ni/imwYv/GJcpAYb5VVfUE4CTGIJ
    yst4yQKBgAgvBkMrmUNPBekBiugrcZA4brhxPdW3pe5bu2Fz75Ee3ZlywhITMiIn
    G3uD5+b1sZMpIU5HkA3dml4rXASw00i2plMCeQS+gIZbR3QyVQcMZA88f2zQs0kb
    KtUrwmdCdgbXqLGI/4pKNAlbPtJ3l/3RZ5zc1q5pq/cEiBOVwYK4
    -----END RSA PRIVATE KEY-----

    -----BEGIN RSA PRIVATE KEY----- 和 -----END RSA PRIVATE KEY-----为分割分,表示在这两个中间存的是私钥的base64编码

    备注:PRIVATE KEY 单词代表 私钥、秘钥的意思。

  • 相关阅读:
    java版二维码实例(非安卓版)
    Java—SSH(MVC)
    关于flex里面mousedown 和click事件冲突问题的解决办法
    navicat ssh通道受限问题处理
    如何更改linux文件目录拥有者及用户组
    如何查看linux中的ssh端口开启状态
    centos linux mysql 10060远程错误代码
    Navicat for MySQL 使用SSH方式链接远程数据库(二)
    Petri Net 的形式化定义
    如何做鲫鱼豆腐汤
  • 原文地址:https://www.cnblogs.com/djwhome/p/12539872.html
Copyright © 2011-2022 走看看