On Tue, Sep 04, 2007, Martin Peylo wrote:
> Hi,
>
> I'm trying to get into the ASN1 stuff of Openssl. I'm having problems
> using the X509_ALGOR structure, could anyone please be so kind help me
> with this?
>
> I have to set something like
> === CODE ===
> typedef struct xxx_mysequence_st
> {
> ASN1_INTEGER *element_one;
> ASN1_INTEGER *element_two;
> } XXX_MYSEQUENCE;
> DECLARE_ASN1_FUNCTIONS(XXX_MYSEQUENCE)
> === /CODE ===
> as the parameter in the X509_ALGOR structure.
>
> Using the line
> === CODE ===
> X509_ALGOR_set0( algor, OBJ_txt2obj("1.2.3.4.5", 1), V_ASN1_SEQUENCE, myseq);
> === /CODE ===
> to set it works fine, but when I'm doing i2d_X509_ALGOR on this I
> encounter a segfault.
>
The parameter to X509_ALGOR_set0() in this case should be an ASN1_STRING
structure containing the encoding of the sequence.
Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]