Change the 'other' structure in certificate aux info.
authorDr. Stephen Henson <steve@openssl.org>
Sun, 20 Feb 2000 18:27:23 +0000 (18:27 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 20 Feb 2000 18:27:23 +0000 (18:27 +0000)
CHANGES
Configure
crypto/asn1/x_x509a.c
crypto/x509/x509.h

diff --git a/CHANGES b/CHANGES
index 7641ec98ebaf00c9fd292d902f920a31c9a333e9..61306507da17d3dc41f9c7a631a500352f92841e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 0.9.4 and 0.9.5  [xx XXX 2000]
 
+  *) Change the 'other' type in certificate aux info to a STACK_OF
+     X509_ALGOR. Although not an AlgorithmIdentifier as such it has
+     the required ASN1 format: arbitrary types determined by an OID.
+     [Steve Henson]
+
   *) Add some PEM_write_X509_REQ_NEW() functions and a command line
      argument to 'req'. This is not because the function is newer or
      better than others it just uses the work 'NEW' in the certificate
index 86097049c72739c5fe74f2196a106a16df6162cb..4289c9d950e4ea42e8c4b536ed6e70e2c73471e4 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -103,7 +103,7 @@ my %table=(
 "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown)::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "debug-bodo",  "gcc:-DBIO_PAIR_DEBUG -DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -m486 -pedantic -Wshadow -Wall::-D_REENTRANT::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "debug-ulf",   "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
-"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
+"debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe::-D_REENTRANT::$x86_gcc_des $x86_gcc_opts:$x86_elf_asm",
 "debug-levitte-linux-elf","gcc:-DRL_DEBUG -DREF_CHECK -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe::-D_REENTRANT:::",
 "dist",                "cc:-O::(unknown):::::",
 
index 77f8588e1cc35357d223ecfb1102cdac698b8450..84af2929e19bae33cec7a48d03b7f8977ade4af6 100644 (file)
@@ -84,7 +84,8 @@ X509_CERT_AUX *d2i_X509_CERT_AUX(X509_CERT_AUX **a, unsigned char **pp, long len
                                        d2i_ASN1_OBJECT, ASN1_OBJECT_free, 0);
        M_ASN1_D2I_get_opt(ret->alias, d2i_ASN1_UTF8STRING, V_ASN1_UTF8STRING);
        M_ASN1_D2I_get_opt(ret->keyid, d2i_ASN1_OCTET_STRING, V_ASN1_OCTET_STRING);
-       M_ASN1_D2I_get_opt(ret->other, d2i_ASN1_TYPE, V_ASN1_SEQUENCE);
+       M_ASN1_D2I_get_IMP_set_opt_type(X509_ALGOR, ret->other,
+                                       d2i_X509_ALGOR, X509_ALGOR_free, 1);
 
        M_ASN1_D2I_Finish(a, X509_CERT_AUX_free, ASN1_F_D2I_X509_CERT_AUX);
 }
@@ -110,7 +111,7 @@ void X509_CERT_AUX_free(X509_CERT_AUX *a)
        sk_ASN1_OBJECT_pop_free(a->reject, ASN1_OBJECT_free);
        ASN1_UTF8STRING_free(a->alias);
        ASN1_OCTET_STRING_free(a->keyid);
-       ASN1_TYPE_free(a->other);
+       sk_X509_ALGOR_pop_free(a->other, X509_ALGOR_free);
        Free(a);
 }
 
@@ -123,7 +124,7 @@ int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **pp)
 
        M_ASN1_I2D_len(a->alias, i2d_ASN1_UTF8STRING);
        M_ASN1_I2D_len(a->keyid, i2d_ASN1_OCTET_STRING);
-       M_ASN1_I2D_len(a->other, i2d_ASN1_TYPE);
+       M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509_ALGOR, a->other, i2d_X509_ALGOR, 1);
 
        M_ASN1_I2D_seq_total();
 
@@ -132,7 +133,7 @@ int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **pp)
 
        M_ASN1_I2D_put(a->alias, i2d_ASN1_UTF8STRING);
        M_ASN1_I2D_put(a->keyid, i2d_ASN1_OCTET_STRING);
-       M_ASN1_I2D_put(a->other, i2d_ASN1_TYPE);
+       M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509_ALGOR, a->other, i2d_X509_ALGOR, 1);
 
        M_ASN1_I2D_finish();
 }
index f7dcfa6ebe185794b5f622188f5411959f119098..69a2e35ea9e512b060db5d2b4402d10684299488 100644 (file)
@@ -242,7 +242,7 @@ typedef struct x509_cert_aux_st
        STACK_OF(ASN1_OBJECT) *reject;          /* rejected uses */
        ASN1_UTF8STRING *alias;                 /* "friendly name" */
        ASN1_OCTET_STRING *keyid;               /* key id of private key */
-       ASN1_TYPE *other;                       /* other unspecified info */
+       STACK_OF(X509_ALGOR) *other;            /* other unspecified info */
        } X509_CERT_AUX;
 
 typedef struct x509_st