On Tue, Jun 11, 2002 at 01:46:40PM +0200, Michael Bell wrote:
> Hi,
>
> I start a simple implementation of othername only for strings in the
> subject alternative name. Actually I have a problem with the resolving
> of the ASN1_TYPE.
>
> OTHERNAME is defined like this in crypto/x509v3/x509v3.h:
>
> typedef struct otherName_st {
> ASN1_OBJECT *type_id;
> ASN1_TYPE *value;
> } OTHERNAME;
>
> The problem is that I must do a typecast to store a special type in
> *value but I must know the type in crypto/asn1/tasn_enc.c where
> ASN1_item_ex_i2d must calculate the length of the sequence.
>
> The code crashs in the loop after /* First work out sequence content
> length */ at the second iteration in the line
>
> seqcontlen += ASN1_template_i2d(pseqval, NULL, seqtt);
>
> Is there a trick to get the type from the structure or must I change
> x509v3.h (ASN1_TYPE --> ASN1_CHOICE) and define the supported
> ASN1-types?
"Policy" certificate extension generator may be an example to do this.
Naina package: http://www.unity.net/~vf/naina_r1.tgz
hope this helps,
Vadim
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]