使用Openssl查看证书是DER and PEM(BASE64)编码

请到官方下载openssl

https://www.openssl.org/source/

下载到本地之后解压,将要查看的证书放到openssl目录下

打开command窗口

具体命令请参考下文:

One way to verify if "keytool" did export my certificate using DER and PEM formats correctly or not is to use "OpenSSL" to view those certificate files. To do this, I used the "openssl x509" command to view keytool_crt.der and keytool_crt.pem:

>openssl x509 -in keytool_crt.pem -inform pem -noout -text

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1185636568 (0x46ab60d8)
        Signature Algorithm: dsaWithSHA1
        Issuer: C=CA, ST=Herong State, L=Herong City, ...
        ...

>openssl x509 -in keytool_crt.der -inform der -noout -text

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1185636568 (0x46ab60d8)
        Signature Algorithm: dsaWithSHA1
        Issuer: C=CA, ST=Herong State, L=Herong City, ...
        O=Herong Company, OU=Heron
        ...

Cool. "OpenSSL" can read certificates in DER and PEM formats generated by "keytool". What I learned so far:

  • "keytool" can generate self-signed X5.09 version 3 certificates.
  • "keytool" can export certificates with DER and PEM formats.
  • "OpenSSL" can read certificates generated by "keytool" in both DER and PEM formats.
时间: 2024-08-09 07:43:52

使用Openssl查看证书是DER and PEM(BASE64)编码的相关文章

openssl 查看证书细节

打印证书的过期时间 openssl x509 -in signed.crt -noout -dates 打印出证书的内容: openssl x509 -in cert.pem -noout -text 打印出证书的系列号 openssl x509 -in cert.pem -noout -serial 打印出证书的拥有者名字 openssl x509 -in cert.pem -noout -subject 以RFC2253规定的格式打印出证书的拥有者名字 openssl x509 -in ce

OPENSSL中RSA私钥文件(PEM格式)解析【一】

http://blog.sina.com.cn/s/blog_4fcd1ea30100yh4s.html 在PKCS#1 RSA算法标准中定义RSA私钥语法为: RSAPrivateKey ::= SEQUENCE { version Version, modulus INTEGER, -- n publicExponent INTEGER, -- e privateExponent INTEGER, -- d prime1 INTEGER, -- p prime2 INTEGER, -- q

openssl数字证书常见格式与协议介绍

证书主要的文件类型和协议有: PEM.DER.PFX.JKS.KDB.CER.KEY.CSR.CRT.CRL .OCSP.SCEP等. PEM – Openssl使用 PEM(Privacy Enhanced Mail)格式来存放各种信息,它是 openssl 默认采用的信息存放方式.Openssl 中的 PEM 文件一般包含如下信息: 内容类型:表明本文件存放的是什么信息内容,它的形式为“——-BEGIN XXXX ——”,与结尾的“——END XXXX——”对应. 头信息:表明数据是如果被处

openssl查看pem格式证书细节

openssl x509部分命令 打印出证书的内容:openssl x509 -in cert.pem -noout -text打印出证书的系列号openssl x509 -in cert.pem -noout -serial打印出证书的拥有者名字openssl x509 -in cert.pem -noout -subject以RFC2253规定的格式打印出证书的拥有者名字openssl x509 -in cert.pem -noout -subject -nameopt RFC2253在支持

使用 openssl 生成证书

转自:http://www.cnblogs.com/littleatp/p/5878763.html 使用 openssl 生成证书 一.openssl 简介 openssl 是目前最流行的 SSL 密码库工具,其提供了一个通用.健壮.功能完备的工具套件,用以支持SSL/TLS 协议的实现.官网:https://www.openssl.org/source/ 构成部分 密码算法库 密钥和证书封装管理功能 SSL通信API接口 用途 建立 RSA.DH.DSA key 参数 建立 X.509 证书

openssl生成证书以及获取公钥和私钥

一.RSA方式 1. 建立CA根证书 1) 建立目录RSA 2) 创建以下子目录certs, crl, newcerts 3) 在RSA目录下执行以下操作: echo 01 > serial touch index.txt openssl req -new -x509 -newkey rsa:1024 -keyout CA.key -out CA.pem (生成自签名CA证书) 2. 客户端证书请求 openssl req -new -newkey rsa:1024 -keyout ddmdd_

Golang(十一)TLS 相关知识(二)OpenSSL 生成证书

0. 前言 接前一篇文章,上篇文章我们介绍了数字签名.数字证书等基本概念和原理 本篇我们尝试自己生成证书 参考文献:TLS完全指南(二):OpenSSL操作指南 1. OpenSSL 简介 OpenSSL 是一个开源项目,其组成主要包括三个组件: openssl:多用途的命令行工具 libcrypto:加密算法库 libssl:加密模块应用库,实现了ssl及tls OpenSSL 主要用于秘钥证书管理.对称加密和非对称加密 1.1 指令 常用指令包括:genrsa.req.x509 1.1.1

windows下使用openssl生成证书

一:下载 使用的是0.9.8 1:openssl下载,http://www.openssl.org/source/ 2:安装vs2010,并安装 3:下载perl,http://www.activestate.com/ActivePerl,并安装. 二:安装openssl 1:解压到系统盘C:\openssl-0.9.8v 2.配置WIN32环境 打开CMD命令行,进入C:\openssl-0.9.8v目录,执行命令 perl Configure VC-WIN32 注意区分大小写 3.进入VC

(备忘)openssl的证书格式转换

PKCS 全称是Public-KeyCryptography Standards ,是由 RSA 实验室与其它安全系统开发商为促进公钥密码的发展而制订的一系列标准,PKCS 目前共发布过15 个标准. 常用的有:PKCS#7 Cryptographic Message Syntax StandardPKCS#10 Certification Request StandardPKCS#12 Personal Information Exchange Syntax StandardX.509是常见通