Bug with X509_dup ? - Openssl

This is a discussion on Bug with X509_dup ? - Openssl ; Hello, I wrote this code : X509* CA = X509_new(); X509* cert = X509_dup ( CA ); Each time i got a segmentation fault when i use cert (cert == NULL is true, but CA != NULL). For me, X509_dup ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Bug with X509_dup ?

  1. Bug with X509_dup ?

    Hello,

    I wrote this code :
    X509* CA = X509_new();
    X509* cert = X509_dup ( CA );

    Each time i got a segmentation fault when i use cert (cert == NULL is
    true, but CA != NULL). For me, X509_dup duplicate the given X509
    certificate, so i don't think that cert == NULL is a good behavior. .
    I'm using openssl 0.9.8g with kubuntu 8.04 64bit edition.

    Am i right ?
    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    Development Mailing List openssl-dev@openssl.org
    Automated List Manager majordomo@openssl.org


  2. Re: Bug with X509_dup ?

    An empty certificate is not a valid one, fill something inside and
    try again.

    Max

    On Jun 12, 2008, at 2:59 PM, delcour.pierre wrote:
    > Hello,
    >
    > I wrote this code :
    > X509* CA = X509_new();
    > X509* cert = X509_dup ( CA );
    >
    > Each time i got a segmentation fault when i use cert (cert == NULL
    > is true, but CA != NULL). For me, X509_dup duplicate the given X509
    > certificate, so i don't think that cert == NULL is a good
    > behavior. . I'm using openssl 0.9.8g with kubuntu 8.04 64bit edition.
    >
    > Am i right ?
    > __________________________________________________ ____________________
    > OpenSSL Project http://www.openssl.org
    > Development Mailing List openssl-dev@openssl.org
    > Automated List Manager majordomo@openssl.org


    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    Development Mailing List openssl-dev@openssl.org
    Automated List Manager majordomo@openssl.org


+ Reply to Thread