Hua Wu wrote:
> 
> Thanks for the reply. But my problem is still there.
> 
> Upon your suggestion, I got newer version of crypto\x509v3\v3_purp.c
> and rebuilt the openssl library with debug. I found the change
> couldn't fix my problem since that bug was in the case of checking
> CA's purpose (ca!=0). But my case is DEPTH_ZERO_SELF_SIGNED_CERT (ca==0).
> 
> During debugging into v3_purp.c, it was the macro 'ku_reject' which
> returned TRUE that caused check_purpose_ssl_server returned 0,
> and then made X509_V_ERR_INVALID_PURPOSE happen. The status
> in check_purpose_ssl_server was
>         X509* x->ex_flag = 0x133
>                 x->ex_kusage = 0x06
> The first one matched EXFLAG_KUSAGE (0x02) while the second differed from
> KU_DIGITAL_SIGNATURE|KU_KEY_ENCIPHERMENT (0x80).
> 
> I found that ex_kusage was defined from
> X509.cert_info->extensions->value->date.
> But I don't understand what 'data' means and where and how they are
> assigned?
> Can anyone tell me what's wrong there? Is the self-signed certificate not
> defined properly?
> 

Probably not. From what you say it has a key usage of certificate and
CRL sign only. 

This means it cannot be used as an SSL server certificate: it needs key
encipherment and/or digital signature for that, preferably both.

If that doesn't help why don't you include the certificate giving the
problem? Then its more obvious what the trouble is.

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


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to