本文整理汇总了Java中org.bouncycastle.asn1.crmf.CertReqMsg类的典型用法代码示例。如果您正苦于以下问题:Java CertReqMsg类的具体用法?Java CertReqMsg怎么用?Java CertReqMsg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CertReqMsg类属于org.bouncycastle.asn1.crmf包,在下文中一共展示了CertReqMsg类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testSubsequentMessage
import org.bouncycastle.asn1.crmf.CertReqMsg; //导入依赖的package包/类
public void testSubsequentMessage()
throws Exception
{
KeyPairGenerator kGen = KeyPairGenerator.getInstance("RSA", BC);
kGen.initialize(512);
KeyPair kp = kGen.generateKeyPair();
X509CertificateHolder cert = makeV3Certificate(kp, "CN=Test", kp, "CN=Test");
ContentSigner signer = new JcaContentSignerBuilder("SHA256withRSA").setProvider(BC).build(
kp.getPrivate());
GeneralName user = new GeneralName(new X500Name("CN=Test"));
CertificateRequestMessageBuilder builder = new JcaCertificateRequestMessageBuilder(
BigInteger.valueOf(1)).setPublicKey(kp.getPublic()).setProofOfPossessionSubsequentMessage(
SubsequentMessage.encrCert);
ProtectedPKIMessage certRequestMsg = new ProtectedPKIMessageBuilder(user,
user).setTransactionID(new byte[] { 1, 2, 3, 4, 5 }).setBody(
new PKIBody(PKIBody.TYPE_KEY_UPDATE_REQ, new CertReqMessages(builder.build().toASN1Structure()))).addCMPCertificate(
cert).build(signer);
ProtectedPKIMessage msg = new ProtectedPKIMessage(new GeneralPKIMessage(certRequestMsg.toASN1Structure().getEncoded()));
CertReqMessages reqMsgs = CertReqMessages.getInstance(msg.getBody().getContent());
CertReqMsg reqMsg = reqMsgs.toCertReqMsgArray()[0];
assertEquals(ProofOfPossession.TYPE_KEY_ENCIPHERMENT, reqMsg.getPopo().getType());
}
开发者ID:credentials,项目名称:irma_future_id,代码行数:33,代码来源:AllTests.java
示例2: CertificateRequestMessage
import org.bouncycastle.asn1.crmf.CertReqMsg; //导入依赖的package包/类
public CertificateRequestMessage(CertReqMsg certReqMsg)
{
this.certReqMsg = certReqMsg;
this.controls = certReqMsg.getCertReq().getControls();
}
开发者ID:Appdome,项目名称:ipack,代码行数:6,代码来源:CertificateRequestMessage.java
示例3: JcaCertificateRequestMessage
import org.bouncycastle.asn1.crmf.CertReqMsg; //导入依赖的package包/类
public JcaCertificateRequestMessage(byte[] certReqMsg)
{
this(CertReqMsg.getInstance(certReqMsg));
}
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:JcaCertificateRequestMessage.java
示例4: JcaCertificateRequestMessage
import org.bouncycastle.asn1.crmf.CertReqMsg; //导入依赖的package包/类
public JcaCertificateRequestMessage(CertReqMsg certReqMsg)
{
super(certReqMsg);
}
开发者ID:credentials,项目名称:irma_future_id,代码行数:5,代码来源:JcaCertificateRequestMessage.java
示例5: toASN1Structure
import org.bouncycastle.asn1.crmf.CertReqMsg; //导入依赖的package包/类
/**
* Return the underlying ASN.1 object defining this CertificateRequestMessage object.
*
* @return a CertReqMsg.
*/
public CertReqMsg toASN1Structure()
{
return certReqMsg;
}
开发者ID:Appdome,项目名称:ipack,代码行数:10,代码来源:CertificateRequestMessage.java
注:本文中的org.bouncycastle.asn1.crmf.CertReqMsg类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论