Java安全编程:CertStore与JCE的深入解析
1. CertStore的使用
CertStore提供了获取证书和证书吊销列表(CRL)的功能。可以通过以下静态方法获取CertStore实例:
public static CertStore getInstance(String type, CertStoreParameters params)
public static CertStore getInstance(String type, CertStoreParameters params, String provider)
public static CertStore getInstance(String type, CertStoreParameters params, Provider provider)
其中, type 参数代表存储库类型的名称,如LDAP或Java集合的Collection。特定的 CertStoreParameters 因存储库类型而异。可以使用以下方法检索用于初始化CertStore的参数:
public final CertStoreParameters getCertStoreParameters()
为了从CertStore中检索证书和CRL,引入了选择器的概念。选择器定义了用于选择要返回的证书或CRL集合的标准。提供了以下方法来选择和返回证书或CRL集合:
超级会员免费看
订阅专栏 解锁全文
48

被折叠的 条评论
为什么被折叠?



