Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex().
authorDr. Stephen Henson <steve@openssl.org>
Mon, 10 Nov 2003 01:25:11 +0000 (01:25 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 10 Nov 2003 01:25:11 +0000 (01:25 +0000)
CHANGES
crypto/asn1/a_strex.c
crypto/pkcs7/pk7_doit.c

diff --git a/CHANGES b/CHANGES
index 0d8d08cd806f00d593faa077d7b37384b36115f6..9504c46e7eff205f568ac757f736f60e6c4de6e6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,9 @@
 
  Changes between 0.9.7c and 0.9.7d  [xx XXX XXXX]
 
+  *) Print out GeneralizedTime and UTCTime in ASN1_STRING_print_ex().
+     [Peter Sylvester <Peter.Sylvester@EdelWeb.fr>]
+
   *) Use the correct content when signing type "other".
      [Steve Henson]
 
index 8abfdfe59804109473cec23ec3559caa93a33a09..bde666a6ff1553328edb70ec66b04aa67790a518 100644 (file)
@@ -285,7 +285,7 @@ const static signed char tag2nbyte[] = {
        -1, -1, 0, -1,          /* 10-13 */
        -1, -1, -1, -1,         /* 15-17 */
        -1, 1, 1,               /* 18-20 */
-       -1, 1, -1,-1,           /* 21-24 */
+       -1, 1, 1, 1,            /* 21-24 */
        -1, 1, -1,              /* 25-27 */
        4, -1, 2                /* 28-30 */
 };
index 35c7dcd0b3e7778b884328bfb664a3e72d282b72..64404b06300905999335fbcdb13ced8ac81d121b 100644 (file)
@@ -101,6 +101,39 @@ static ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7)
        return NULL;
        }
 
+static int PKCS7_bio_add_digest(BIO **pbio, X509_ALGOR *alg)
+       {
+       BIO *btmp;
+       EVP_MD *md;
+       if ((btmp=BIO_new(BIO_f_md())) == NULL)
+               {
+               PKCS7err(PKCS7_F_PKCS7_DATAINIT,ERR_R_BIO_LIB);
+               goto err;
+               }
+
+       md=EVP_get_digestbyobj(xa->algorithm);
+       if (md == NULL)
+               {
+               PKCS7err(PKCS7_F_PKCS7_DATAINIT,PKCS7_R_UNKNOWN_DIGEST_TYPE);
+               goto err;
+               }
+
+       BIO_set_md(btmp,evp_md);
+       if (*pout == NULL)
+               *pout=btmp;
+       else
+               BIO_push(*pout,btmp);
+       btmp=NULL;
+
+       return 1;
+
+       err:
+       if (btmp)
+               BIO_free(btmp);
+       return 0;
+
+       }
+
 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
        {
        int i;