[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-cvs
Subject:    [CVS] OpenSSL: openssl/apps/ ts.c openssl/crypto/ts/ ts_asn1.c openssl...
From:       "Ulf Moeller" <ulf () openssl ! org>
Date:       2006-02-26 23:34:54
Message-ID: 20060226233454.0F2251AC64B7 () master ! openssl ! org
[Download RAW message or body]

  OpenSSL CVS Repository
  http://cvs.openssl.org/
  ____________________________________________________________________________

  Server: cvs.openssl.org                  Name:   Ulf Moeller
  Root:   /v/openssl/cvs                   Email:  ulf@openssl.org
  Module: openssl                          Date:   27-Feb-2006 00:34:53
  Branch: HEAD                             Handle: 2006022623345003

  Modified files:
    openssl/apps            ts.c
    openssl/crypto/ts       ts_asn1.c
    openssl/doc/apps        ts.pod

  Log:
    TS bugfixes: Do not hardcode message digest algorithms; fix ASN1 decoding.
    
    Submitted by: Zoltan Glozik <zglozik@opentsa.org>

  Summary:
    Revision    Changes     Path
    1.3         +4  -10     openssl/apps/ts.c
    1.4         +2  -2      openssl/crypto/ts/ts_asn1.c
    1.2         +5  -3      openssl/doc/apps/ts.pod
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openssl/apps/ts.c
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 ts.c
  --- openssl/apps/ts.c	13 Feb 2006 09:43:31 -0000	1.2
  +++ openssl/apps/ts.c	26 Feb 2006 23:34:50 -0000	1.3
  @@ -191,16 +191,6 @@
   			if (argc-- < 1) goto usage;
   			digest = *++argv;
   			}
  -		else if (strcmp(*argv, "-md2") == 0
  -			|| strcmp(*argv, "-md4") == 0
  -			|| strcmp(*argv, "-md5") == 0
  -			|| strcmp(*argv, "-sha") == 0
  -			|| strcmp(*argv, "-sha1") == 0
  -			|| strcmp(*argv, "-mdc2") == 0
  -			|| strcmp(*argv, "-ripemd160") == 0)
  -			{
  -			md = EVP_get_digestbyname(*argv + 1);
  -			}
   		else if (strcmp(*argv, "-rand") == 0)
   			{
   			if (argc-- < 1) goto usage;
  @@ -296,6 +286,10 @@
   			if (argc-- < 1) goto usage;
   			engine = *++argv;
   			}
  +		else if ((md = EVP_get_digestbyname(*argv + 1)) != NULL)
  +			{
  +			/* empty. */
  +			}
   		else
   			goto usage;
   		}
  @@ .
  patch -p0 <<'@@ .'
  Index: openssl/crypto/ts/ts_asn1.c
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 ts_asn1.c
  --- openssl/crypto/ts/ts_asn1.c	14 Feb 2006 07:55:03 -0000	1.3
  +++ openssl/crypto/ts/ts_asn1.c	26 Feb 2006 23:34:52 -0000	1.4
  @@ -89,7 +89,7 @@
   	ASN1_SIMPLE(TS_REQ, msg_imprint, TS_MSG_IMPRINT),
   	ASN1_OPT(TS_REQ, policy_id, ASN1_OBJECT),
   	ASN1_OPT(TS_REQ, nonce, ASN1_INTEGER),
  -	ASN1_OPT(TS_REQ, cert_req, ASN1_BOOLEAN),
  +	ASN1_OPT(TS_REQ, cert_req, ASN1_FBOOLEAN),
   	ASN1_IMP_SEQUENCE_OF_OPT(TS_REQ, extensions, X509_EXTENSION, 0)
   } ASN1_SEQUENCE_END(TS_REQ)
   
  @@ -134,7 +134,7 @@
   	ASN1_SIMPLE(TS_TST_INFO, serial, ASN1_INTEGER),
   	ASN1_SIMPLE(TS_TST_INFO, time, ASN1_GENERALIZEDTIME),
   	ASN1_OPT(TS_TST_INFO, accuracy, TS_ACCURACY),
  -	ASN1_OPT(TS_TST_INFO, ordering, ASN1_BOOLEAN),
  +	ASN1_OPT(TS_TST_INFO, ordering, ASN1_FBOOLEAN),
   	ASN1_OPT(TS_TST_INFO, nonce, ASN1_INTEGER),
   	ASN1_EXP_OPT(TS_TST_INFO, tsa, GENERAL_NAME, 0),
   	ASN1_IMP_SEQUENCE_OF_OPT(TS_TST_INFO, extensions, X509_EXTENSION, 1)
  @@ .
  patch -p0 <<'@@ .'
  Index: openssl/doc/apps/ts.pod
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 ts.pod
  --- openssl/doc/apps/ts.pod	12 Feb 2006 23:11:50 -0000	1.1
  +++ openssl/doc/apps/ts.pod	26 Feb 2006 23:34:53 -0000	1.2
  @@ -12,7 +12,7 @@
   [B<-config> configfile]
   [B<-data> file_to_hash]
   [B<-digest> digest_bytes]
  -[B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>]
  +[B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...>]
   [B<-policy> object_id]
   [B<-no_nonce>]
   [B<-cert>]
  @@ -124,9 +124,11 @@
   1AF601...). The number of bytes must match the message digest algorithm 
   in use. (Optional)
   
  -=item B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>
  +=item B<-md2>|B<-md4>|B<-md5>|B<-sha>|B<-sha1>|B<-mdc2>|B<-ripemd160>|B<...>
   
  -The message digest to apply to the data file. The default is SHA-1. (Optional)
  +The message digest to apply to the data file, it supports all the message
  +digest algorithms that are supported by the openssl B<dgst> command.
  +The default is SHA-1. (Optional)
   
   =item B<-policy> object_id
   
  @@ .
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                     openssl-cvs@openssl.org
Automated List Manager                           majordomo@openssl.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic