From de8f24ea083384bb66b32ec105dc4743c5663cdf Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 29 Sep 1999 04:37:45 +0000 Subject: OpenSSL 0.9.4 merge --- src/lib/libcrypto/asn1/x_algor.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'src/lib/libcrypto/asn1/x_algor.c') diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index 0ed2c87b64..b2c20d139f 100644 --- a/src/lib/libcrypto/asn1/x_algor.c +++ b/src/lib/libcrypto/asn1/x_algor.c @@ -58,17 +58,10 @@ #include #include "cryptlib.h" -#include "asn1_mac.h" +#include +#include -/* - * ASN1err(ASN1_F_D2I_X509_ALGOR,ASN1_R_LENGTH_MISMATCH); - * ASN1err(ASN1_F_X509_ALGOR_NEW,ASN1_R_EXPECTING_A_SEQUENCE); - * ASN1err(ASN1_F_D2I_X509_ALGOR,ASN1_R_LENGTH_MISMATCH); - */ - -int i2d_X509_ALGOR(a,pp) -X509_ALGOR *a; -unsigned char **pp; +int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -84,10 +77,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -X509_ALGOR *d2i_X509_ALGOR(a,pp,length) -X509_ALGOR **a; -unsigned char **pp; -long length; +X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, unsigned char **pp, long length) { M_ASN1_D2I_vars(a,X509_ALGOR *,X509_ALGOR_new); @@ -104,19 +94,19 @@ long length; M_ASN1_D2I_Finish(a,X509_ALGOR_free,ASN1_F_D2I_X509_ALGOR); } -X509_ALGOR *X509_ALGOR_new() +X509_ALGOR *X509_ALGOR_new(void) { X509_ALGOR *ret=NULL; + ASN1_CTX c; M_ASN1_New_Malloc(ret,X509_ALGOR); - M_ASN1_New(ret->algorithm,ASN1_OBJECT_new); + ret->algorithm=OBJ_nid2obj(NID_undef); ret->parameter=NULL; return(ret); M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW); } -void X509_ALGOR_free(a) -X509_ALGOR *a; +void X509_ALGOR_free(X509_ALGOR *a) { if (a == NULL) return; ASN1_OBJECT_free(a->algorithm); @@ -124,3 +114,5 @@ X509_ALGOR *a; Free((char *)a); } +IMPLEMENT_STACK_OF(X509_ALGOR) +IMPLEMENT_ASN1_SET_OF(X509_ALGOR) -- cgit v1.2.3-55-g6feb