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 84b77e3..4ce91e2 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;