Fix to i2d_DSAPublicKey() to return the correct length.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 11 Jun 1999 22:30:45 +0000 (22:30 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 11 Jun 1999 22:30:45 +0000 (22:30 +0000)
Submitted by: Jeon KyoungHo <khjeon@sds.samsung.co.kr>

CHANGES
crypto/asn1/i2d_s_pu.c

diff --git a/CHANGES b/CHANGES
index df27820..7e9e420 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.3a and 0.9.4
 
+  *) Fix a bug in i2d_DSAPublicKey() which meant it returned the wrong value
+     for the encoded length.
+     [Jeon KyoungHo <khjeon@sds.samsung.co.kr>]
+
   *) Add initial documentation of the X509V3 functions.
      [Steve Henson]
 
index 25b1507..18f790f 100644 (file)
@@ -123,6 +123,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp)
                }
        Free((char *)bs.data);
        *pp=p;
-       return(t);
+       if(all) return(t);
+       else return(tot);
        }
 #endif