check DSA_sign() return value properly
authorDr. Stephen Henson <steve@openssl.org>
Tue, 1 Dec 2009 18:41:50 +0000 (18:41 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 1 Dec 2009 18:41:50 +0000 (18:41 +0000)
crypto/dsa/dsa_pmeth.c

index 84b77e3bfcd60000e6cf009edc42bd48110b0b2d..4ce91e20c64375899819bdecfb839bb23220d61f 100644 (file)
@@ -132,7 +132,7 @@ static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
 
        ret = DSA_sign(type, tbs, tbslen, sig, &sltmp, dsa);
 
-       if (ret < 0)
+       if (ret <= 0)
                return ret;
        *siglen = sltmp;
        return 1;