Quantcast

PEMReader and PEMWriter Issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PEMReader and PEMWriter Issues

Smith, Bill (Tridium)

When we were using 1.46, we were reading and writing csrs with PEMReader and PEMWriter, passing in/receiving an org.bouncycastle.jce.PKCS10CertificationRequest. While in the process of migrating to 1.47, we are trying to move away from the deprecated classes and have switched to using:

 

org.bouncycastle.asn1.pkcs.CertificationRequest

org.bouncycastle.pkcs.PKCS10CertificationRequest

org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest

 

actually maintaining a reference to the JcaPKCS10CertificationRequest instance. However, when I try and write (any of the above), PEMWriter complains “unknown object passed - can't encode” and when I try and read, PEMReader returns an instance of the deprecated org.bouncycastle.jce.PKCS10CertificationRequest.

 

What is the proper way to read/write the non deprecated cert request object(s) or do I have to still use the legacy version? If I have to use the legacy, is there a straight forward way to convert to/from a JcaPKCS10CertificationRequest?

 

Regards,

Bill

 

 

------------------------------------------

Bill Smith

Tridium, Inc.

Software Engineer

804-527-3141

 

Notice: This email message, together with any attachments, contains information of Tridium Incorporated, which may be confidential, proprietary, copyrighted and/or legally privileged. This email is intended solely for the use of the individual or entity named on the message. If you are not the intended recipient, and have received this message in error, please immediately return by email and then delete it.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PEMReader and PEMWriter Issues

David Hook-2

Converting between them can be done via the getEncoded() methods and the corresponding constructors. I'll try and follow up on the Jira issue associated with this shortly.

Regards,

David

On 19/06/12 23:22, Smith, Bill (Tridium) wrote:

When we were using 1.46, we were reading and writing csrs with PEMReader and PEMWriter, passing in/receiving an org.bouncycastle.jce.PKCS10CertificationRequest. While in the process of migrating to 1.47, we are trying to move away from the deprecated classes and have switched to using:

 

org.bouncycastle.asn1.pkcs.CertificationRequest

org.bouncycastle.pkcs.PKCS10CertificationRequest

org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest

 

actually maintaining a reference to the JcaPKCS10CertificationRequest instance. However, when I try and write (any of the above), PEMWriter complains “unknown object passed - can't encode” and when I try and read, PEMReader returns an instance of the deprecated org.bouncycastle.jce.PKCS10CertificationRequest.

 

What is the proper way to read/write the non deprecated cert request object(s) or do I have to still use the legacy version? If I have to use the legacy, is there a straight forward way to convert to/from a JcaPKCS10CertificationRequest?

 

Regards,

Bill

 

 

------------------------------------------

Bill Smith

Tridium, Inc.

Software Engineer

804-527-3141

 

Notice: This email message, together with any attachments, contains information of Tridium Incorporated, which may be confidential, proprietary, copyrighted and/or legally privileged. This email is intended solely for the use of the individual or entity named on the message. If you are not the intended recipient, and have received this message in error, please immediately return by email and then delete it.

 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: PEMReader and PEMWriter Issues

Smith, Bill (Tridium)
Thanks David. That's what I'm doing for now.

Regards,
Bill

From: David Hook [mailto:[hidden email]]
Sent: Wednesday, June 20, 2012 5:18 PM
To: [hidden email]
Subject: Re: [dev-crypto] PEMReader and PEMWriter Issues


Converting between them can be done via the getEncoded() methods and the corresponding constructors. I'll try and follow up on the Jira issue associated with this shortly.

Regards,

David


Loading...