Revert "EC_KEY_priv2buf (): check parameter sanity"
authorRich Salz <rsalz@akamai.com>
Fri, 26 Feb 2016 19:11:46 +0000 (14:11 -0500)
committerRich Salz <rsalz@openssl.org>
Fri, 26 Feb 2016 19:51:25 +0000 (14:51 -0500)
This reverts commit acae59bb29ddc769743ab4a8ae373b5ff2f42b57.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
crypto/ec/ec_key.c

index 439cfa2..c382e7e 100644 (file)
@@ -583,8 +583,8 @@ size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf)
     size_t len;
     unsigned char *buf;
     len = EC_KEY_priv2oct(eckey, NULL, 0);
-    if (len == 0 || pbuf == NULL)
-        return len;
+    if (len == 0)
+        return 0;
     buf = OPENSSL_malloc(len);
     if (buf == NULL)
         return 0;