Wrox Programmer Forums
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 5th, 2008, 09:34 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default OCSPReq creation

Hi there!

I would like to know how I can get the issuer certificate to initialize my CertificateID. What I am trying to do is to verify the certificate using ocsp on an email server. Here I do not have the issuer certificate. Would I be able to instantiate a issuer certificate form the certificate I have in the email? Because otherwise the ocsp would not make much sense if I need to have a repository of issuer certificates.


....
CertificateID id = new CertificateID(CertificateID.HASH_SHA1, issuerCert, certificate.getSerialNumber());
OCSPReqGenerator oscpGenerator = new OCSPReqGenerator();
oscpGenerator.addRequest(id);
....


i.) Where can I get the issuerCert (X509Certificate) from, i.e. at run-time, if I don't have it stored and also do not have an url to fetch it?

I will be very greatful for your help!

 
Old August 5th, 2008, 07:57 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Unfortunately you need the issuer certificate, or at least some parts of it to get OCSP to work. You can see problem if you look at the ASN.1 structure for CertID:

CertID ::= SEQUENCE {
       hashAlgorithm AlgorithmIdentifier,
       issuerNameHash OCTET STRING, -- Hash of Issuer's DN
       issuerKeyHash OCTET STRING, -- Hash of Issuers public key
       serialNumber CertificateSerialNumber }

It requires the issuer DN and the hash of the issuer's public key. A better question to ask is how will you verify the signature on the end entity certificate if you don't have the issuer certificate? If you cannot do that there's no point in using OCSP as well.

Regards,

David


 
Old August 6th, 2008, 01:46 AM
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you so very much. You have completely clarified my query. With best regards, Mark :-)






Similar Threads
Thread Thread Starter Forum Replies Last Post
New desktop creation in C# satya.namburu C# 4 August 5th, 2008 11:30 PM
Database Creation paribaranwal C# 1 June 11th, 2008 03:11 AM
Table creation sunny227 XSLT 3 November 14th, 2007 02:50 PM
Menu creation rupen Classic ASP Basics 0 June 22nd, 2005 06:53 AM
Image Creation canibus Classic ASP Basics 1 November 4th, 2003 03:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.