diff options
author | Rob Austein <sra@hactrn.net> | 2008-03-16 18:10:22 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2008-03-16 18:10:22 +0000 |
commit | c7bdc4105eebe5ec14475e43d0ca9a0422363d33 (patch) | |
tree | d93219914ce3ac0935bbf675003afd421cc28333 /pow/POW-0.7/POW.c | |
parent | f29c3f1933d5fce35a7193859c77ba563473f963 (diff) |
Get PyBool checks right
svn path=/pow/POW-0.7/POW.c; revision=1558
Diffstat (limited to 'pow/POW-0.7/POW.c')
-rw-r--r-- | pow/POW-0.7/POW.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pow/POW-0.7/POW.c b/pow/POW-0.7/POW.c index 8e159b7e..e457453a 100644 --- a/pow/POW-0.7/POW.c +++ b/pow/POW-0.7/POW.c @@ -6332,14 +6332,14 @@ PKCS7_object_sign(pkcs7_object *self, PyObject *args) int len, size = 0, i, flags = PKCS7_BINARY | PKCS7_NOATTR; BIO *bio = NULL; PKCS7 *p7 = NULL; - PyObject *no_certs = Py_True; + PyObject *no_certs = Py_False; - if (!PyArg_ParseTuple(args, "O!O!Os#|O", + if (!PyArg_ParseTuple(args, "O!O!Os#|O!", &x509type, &signcert, &asymmetrictype, &signkey, &x509_sequence, &buf, &len, - no_certs)) + &PyBool_Type, &no_certs)) goto error; if (signkey->key_type != RSA_PRIVATE_KEY) @@ -6376,7 +6376,7 @@ PKCS7_object_sign(pkcs7_object *self, PyObject *args) if ( !(bio = BIO_new_mem_buf(buf, len))) goto error; - if ( PyBool_Check(no_certs) ) + if ( no_certs == Py_True ) flags |= PKCS7_NOCERTS; if ( !(p7 = PKCS7_sign(signcert->x509, pkey, x509_stack, bio, flags))) |