From: Dr. Stephen Henson Date: Fri, 11 Jun 1999 22:30:45 +0000 (+0000) Subject: Fix to i2d_DSAPublicKey() to return the correct length. X-Git-Tag: OpenSSL_0_9_4~176 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9bce3070acf81a2890ec7a6c94b97094691b5038;p=oweals%2Fopenssl.git Fix to i2d_DSAPublicKey() to return the correct length. Submitted by: Jeon KyoungHo --- diff --git a/CHANGES b/CHANGES index df27820a49..7e9e420e38 100644 --- 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 ] + *) Add initial documentation of the X509V3 functions. [Steve Henson] diff --git a/crypto/asn1/i2d_s_pu.c b/crypto/asn1/i2d_s_pu.c index 25b150794a..18f790f746 100644 --- a/crypto/asn1/i2d_s_pu.c +++ b/crypto/asn1/i2d_s_pu.c @@ -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