Subject: RE: Computation of issuerKeyHash in OCSP

From: [email-masked] (Peter Gutmann)
Date: Tue, 13 Mar 2001 11:57:31 (NZDT)

Ambarish Malpani <[email-masked]> writes:

>I have done interop testing of the OCSP responder with Netscape, CertCo, Xeti
>(now part of Critical Path), Computer Associates and a bunch of other folks. I
>would be very surprised if anybody was stripping out the byte that represented
>the number of unused bits.

That would explain why my previously-working code was getting a status of
"unknown" all of a sudden... dammit, make one little update to your code
without thinking and... :-).

Peter.

---

From: Dr S N Henson <[email-masked]>
Date: Mon, 12 Mar 2001 23:39:46 +0000

> without thinking and... :-).

I was stripping the number of unused bits out too: well with
OpenSSL/SSLeay that's the more natural thing to do(*). It is also one of
the recommended mechanisms in RFC2459 (4.2.1.2) and I didn't notice the
difference.

AFAICS using the number of unused bits will just mean that a '0' is
prepended to the data hashed for any valid encoding.

I was getting valid responses from the responders I'd tried which
suggests that either they are ignoring the issuerKeyHash or they are
also ignoring the number of unused bits.

(*) In case anyone is curious... the OpenSSL/SSLeay structure for a BIT
STRING consists of a buffer, a length value and some flags. The buffer
is the BIT STRING *without* the number of unused bits. The actual number
of unused bits is stored in part of the flags field.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [email-masked] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [email-masked] PGP key: via homepage.