Commit 2aff7727 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Rewrite the extension code to use an ASN1_ITEM structure
for its ASN1 operations as well as the old style function
pointers (i2d, d2i, new, free). Change standard extensions
to support this.

Fix a warning in BN_mul(), bn_mul.c about uninitialised 'j'.
parent cc93ae3e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@

 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]

  *) Update the X509V3 code to permit the use of an ASN1_ITEM structure
     for its ASN1 operations. The old style function pointers still exist
     for now but they will eventually go away.
     [Steve Henson]

  *) Merge in replacement ASN1 code from the ASN1 branch. This almost
     completely replaces the old ASN1 functionality.
     [Steve Henson]
+1 −1
Original line number Diff line number Diff line
@@ -939,7 +939,7 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
#endif
#ifdef BN_RECURSION
	BIGNUM *t;
	int j,k;
	int j=0,k;
#endif

#ifdef BN_COUNT
+4 −7
Original line number Diff line number Diff line
@@ -69,15 +69,12 @@ static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method,
			X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);

X509V3_EXT_METHOD v3_akey_id = {
NID_authority_key_identifier, X509V3_EXT_MULTILINE,
(X509V3_EXT_NEW)AUTHORITY_KEYID_new,
(X509V3_EXT_FREE)AUTHORITY_KEYID_free,
(X509V3_EXT_D2I)d2i_AUTHORITY_KEYID,
(X509V3_EXT_I2D)i2d_AUTHORITY_KEYID,
NULL, NULL,
NID_authority_key_identifier, X509V3_EXT_MULTILINE, &AUTHORITY_KEYID_it,
0,0,0,0,
0,0,
(X509V3_EXT_I2V)i2v_AUTHORITY_KEYID,
(X509V3_EXT_V2I)v2i_AUTHORITY_KEYID,
NULL,NULL,
0,0,
NULL
};

+7 −12
Original line number Diff line number Diff line
@@ -66,21 +66,16 @@ static GENERAL_NAMES *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens);
static int copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens);
X509V3_EXT_METHOD v3_alt[] = {
{ NID_subject_alt_name, 0,
(X509V3_EXT_NEW)GENERAL_NAMES_new,
(X509V3_EXT_FREE)GENERAL_NAMES_free,
(X509V3_EXT_D2I)d2i_GENERAL_NAMES,
(X509V3_EXT_I2D)i2d_GENERAL_NAMES,
NULL, NULL,
{ NID_subject_alt_name, 0, &GENERAL_NAMES_it,
0,0,0,0,
0,0,
(X509V3_EXT_I2V)i2v_GENERAL_NAMES,
(X509V3_EXT_V2I)v2i_subject_alt,
NULL, NULL, NULL},
{ NID_issuer_alt_name, 0,
(X509V3_EXT_NEW)GENERAL_NAMES_new,
(X509V3_EXT_FREE)GENERAL_NAMES_free,
(X509V3_EXT_D2I)d2i_GENERAL_NAMES,
(X509V3_EXT_I2D)i2d_GENERAL_NAMES,
NULL, NULL,

{ NID_issuer_alt_name, 0, &GENERAL_NAMES_it,
0,0,0,0,
0,0,
(X509V3_EXT_I2V)i2v_GENERAL_NAMES,
(X509V3_EXT_V2I)v2i_issuer_alt,
NULL, NULL, NULL},
+3 −5
Original line number Diff line number Diff line
@@ -69,11 +69,9 @@ static BASIC_CONSTRAINTS *v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, X509V

X509V3_EXT_METHOD v3_bcons = {
NID_basic_constraints, 0,
(X509V3_EXT_NEW)BASIC_CONSTRAINTS_new,
(X509V3_EXT_FREE)BASIC_CONSTRAINTS_free,
(X509V3_EXT_D2I)d2i_BASIC_CONSTRAINTS,
(X509V3_EXT_I2D)i2d_BASIC_CONSTRAINTS,
NULL, NULL,
&BASIC_CONSTRAINTS_it,
0,0,0,0,
0,0,
(X509V3_EXT_I2V)i2v_BASIC_CONSTRAINTS,
(X509V3_EXT_V2I)v2i_BASIC_CONSTRAINTS,
NULL,NULL,
Loading