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 df27820a49f7e154d93bfed6ba212074938bf468..7e9e420e38a2f8a961169c76842d0a0194612c14 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 25b150794a576bb5be49033fcf8fc871b8569b7b..18f790f746515e9ec3f55cfacbd9df52cf6e7e44 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