diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-12-08 19:09:35 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-12-08 19:09:35 +0000 |
commit | 9d6b1ce6441c7cc6aed344f02d9f676ab5e04217 (patch) | |
tree | 7329435a21d3289cb3caad6d3d6c065f484373e1 /crypto/asn1/a_enum.c | |
parent | 66ebbb6a56bc1688fa37878e4feec985b0c260d7 (diff) |
Merge from the ASN1 branch of new ASN1 code
to main trunk.
Lets see if the makes it to openssl-cvs :-)
Diffstat (limited to 'crypto/asn1/a_enum.c')
-rw-r--r-- | crypto/asn1/a_enum.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c index 1428d1df7a..b507c5ee44 100644 --- a/crypto/asn1/a_enum.c +++ b/crypto/asn1/a_enum.c @@ -65,60 +65,6 @@ * for comments on encoding see a_int.c */ -ASN1_ENUMERATED *ASN1_ENUMERATED_new(void) -{ return M_ASN1_ENUMERATED_new(); } - -void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x) -{ M_ASN1_ENUMERATED_free(x); } - - -int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp) -{ - int len, ret; - if(!a) return 0; - len = i2c_ASN1_INTEGER(a, NULL); - ret=ASN1_object_size(0,len,V_ASN1_ENUMERATED); - if(pp) { - ASN1_put_object(pp,0,len,V_ASN1_ENUMERATED,V_ASN1_UNIVERSAL); - i2c_ASN1_INTEGER(a, pp); - } - return ret; -} - -ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, - long length) -{ - unsigned char *p; - long len; - int i; - int inf,tag,xclass; - ASN1_ENUMERATED *ret; - - p= *pp; - inf=ASN1_get_object(&p,&len,&tag,&xclass,length); - if (inf & 0x80) - { - i=ASN1_R_BAD_OBJECT_HEADER; - goto err; - } - - if (tag != V_ASN1_ENUMERATED) - { - i=ASN1_R_EXPECTING_AN_ENUMERATED; - goto err; - } - ret = c2i_ASN1_INTEGER(a, &p, len); - if(ret) { - ret->type = (V_ASN1_NEG & ret->type) | V_ASN1_ENUMERATED; - *pp = p; - } - return ret; -err: - ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,i); - return(NULL); - -} - int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) { int i,j,k; |