首页 > 其他分享 >openssl验证证书文件pem和key是否匹配

openssl验证证书文件pem和key是否匹配

时间:2024-08-08 20:53:26浏览次数:9  
标签:匹配 openssl private pem key txt

环境:linux环境下

1、从key、pem提取公钥

openssl x509 -in your_certificate.pem -noout -pubkey > public_key.txt
openssl rsa -in your_private_key.key -pubout > private_key_pub.txt

2、验证

diff public_key.txt private_key_pub.txt

diff命令比较这两个公钥文件。如果两者完全相同,说明它们匹配,命令不会输出任何内容;如果有差异,则会显示哪些部分不匹配。
这样,你就可以确认证书的域名、到期时间以及证书与私钥是否匹配了。

标签:匹配,openssl,private,pem,key,txt
From: https://blog.csdn.net/weixin_44663310/article/details/141036190

相关文章

  • windows 编译 openssl + libcurl libcurl库
    主要参考https://blog.icrystal.top/archives/11.htmlopenssl编译网址: https://www.openssl.org/source下载的是3.0.13版本的这边是说Perl:需要Perl来运行OpenSSL的构建脚本。你可以从StrawberryPerl或ActivePerl下载并安装Perl。NASM(可选):如果你要编译支持x86......
  • keycloak~关于社区登录的过程说明
    keycloak将第三方登录(社区登录)进行了封装,大体主要会经历以下三个过程:打开社区认证页面,输入账号密码或者扫码,完成社区上的认证由社区进行302重定向,回到keycloak页面keycloak与社区完成一次oauth2授权码认证,通过社区返回的code来获取token,再通过token来获取社区上的用户信息,在这......
  • openssl升级
    环境:OS:Centos71.当前openssl版本[root@host134soft]#opensslversionOpenSSL1.0.2k-fips26Jan2017 2.查看安装路径[root@host134soft]#whereisopensslopenssl:/usr/bin/openssl/usr/lib64/openssl/usr/include/openssl/usr/share/man/man1/openssl.1ssl.gz......
  • key命令操作
    key命令操作查询###查看所有keykeys*###匹配查看*keyssit*###单个字符匹配?keyssit?###可选匹配[]keyssit[e|y]判断KEY类型###随机返回一个KEYrandomkey###判断key是否存在(0|1)existssite#1表示存在0表示不存在###返回KEY的类型typesite......
  • openssl make报错
    安装openssl时,make./config:error:theHTTPcachemodulerequiresmd5functionsfromOpenSSLlibrary.Youcaneitherdisablethemodulebyusing--without-http-cacheoption,orinstalltheOpenSSLlibraryintothesystem,orbuildtheOpenSSLlibrarystat......
  • keepalive离线安装-解决openssl-devel安装问题
    keepalive源码安装1.下载源码包(这里我是用最新的2.3.1版本):官网2.解压安装包执行:#prefix后边的路径为keepalived安装的路径$./configure--prefix=/usr/local/keepalived$make$makeinstall3.安装openssl-devel如果遇到错误:(没有错误则不用管这一步)configure......
  • ssh 远程登录报错:Unable to negotiate with IP port 22: no matching host key type f
    最近在Mac上想要远程一台Linux服务器,结果不知怎么的就不能使用以前的ssh登录了iot@ios-iMac~%[email protected]:nomatchinghostkeytypefound.Theiroffer:ssh-rsa,ssh-dss ......
  • ; 每隔10分钟定时关闭并重启蘑菇游戏下载器,防止下载器卡死宕机死机停止下载的AutoHot
     ;每隔10分钟定时关闭并重启蘑菇游戏下载器,防止下载器卡死宕机死机停止下载的AutoHotkey脚本2024年8月7日  ;每隔10分钟定时关闭并重启蘑菇游戏下载器,防止下载器卡死宕机死机停止下载的AutoHotkey脚本2024年8月7日;测试环境:AutoHotkey_1.1.37.02_Setup.exe&Win......
  • WPF KeyDown MVVM via CallMethodAction of behavior
    <behavior:Interaction.Triggers><behavior:EventTriggerEventName="KeyDown"><behavior:CallMethodActionMethodName="WinKeyDown"TargetObject="{Binding}"/></behavior:EventTrigger>&......
  • WPF Window.InputBindings KeyBinding Key
    //xaml<Windowx:Class="WpfApp233.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......