gpgsm OCSP question (key usage checking for response
verification)
Werner Koch
wk at gnupg.org
Thu May 18 09:38:05 CEST 2006
Daiki Ueno <ueno at unixuser.org> writes:
> I stepped through the execution using GDB, in line 149 use == 0xffffffff
> (== ~0) and have_ocsp_signing == 1. Now, my question is, why doesn't it
> accept the value ~0 for the variable use? use is corresponding to the
if (use != ~0
&& (have_ocsp_signing
|| (use & (KSBA_KEYUSAGE_KEY_CERT_SIGN
|KSBA_KEYUSAGE_CRL_SIGN))))
return 0;
With use == 0xffffffff (assuming 32 bit unsigned int) this evaluates to
if ( 0 && (have_ocsp_signing
|| (0xffffffff & (KSBA_KEYUSAGE_KEY_CERT_SIGN
|KSBA_KEYUSAGE_CRL_SIGN))))
return 0;
Thus you won't get to the return.
Shalom-Salam,
Werner
More information about the Gnupg-devel
mailing list