java 证书缺乏扩展项_Java解析证书的例子(包括基本项目、扩展项目) | 学步园

这个Java程序展示了如何解析X509证书,包括获取证书版本、序列号、密钥使用、基本限制、CRL分布点和证书策略等扩展信息。通过使用BouncyCastle库,程序能够读取和处理证书的asn1结构。
摘要由CSDN通过智能技术生成

import java.io.*;

import org.bouncycastle.asn1.*;

import org.bouncycastle.asn1.util.*;

import org.bouncycastle.asn1.x509.*;

import org.bouncycastle.util.encoders.*;

public class CertManager {

String eoid[][]={

{new String("Subject Key Identifier"), new String("2.5.29.14")},

{new String("Key Usage"),           new String("2.5.29.15")},

{new String("Private Key Usage Period"),new String("2.5.29.16")},

{new String("Subject Alternative Name"),new String("2.5.29.17")},

{new String("Issuer Alternative Name"), new String("2.5.29.18")},

{new String("Basic Constraints"),     new String("2.5.29.19")},

{new String("CRL Number"),         new String("2.5.29.20")},

{new String("Reason code"),         new String("2.5.29.21")},

{new String("Hold Instruction Code"),   new String("2.5.29.23")},

{new String("Invalidity Date"),       new String("2.5.29.24")},

{new String("Delta CRL indicator"),   new String("2.5.29.27")},

{new String("Issuing Distribution Point"),new String("2.5.29.28")},

{new String("Certificate Issuer"),     new String("2.5.29.29")},

{new String("Name Constraints"),     new String("2.5.29.30")},

{new String("CRL Distribution Points"), new String("2.5.29.31")},

{new String("Certificate Policies"),   new String("2.5.29.32")},

{new String("Policy Mappings"),       new String

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值