Fix to i2d_DSAPublicKey() to return the correct length.
[openssl.git] / crypto / asn1 / i2d_s_pu.c
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