diff options
author | Rob Austein <sra@hactrn.net> | 2012-10-10 21:22:45 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-10-10 21:22:45 +0000 |
commit | 48ec51aaff720c82c50dbb2c8d05c7ba6d1efbe4 (patch) | |
tree | a3819ad968a6285fcaf7328fa54e01d0ad3282f4 | |
parent | a1b5c92e8e688cf3145127ff69304140a45b8139 (diff) |
Fix length of manifest BIT STRING. Remove extraneous argument from
CMS subclass .sign() method calling sequences.
svn path=/branches/tk274/; revision=4764
-rw-r--r-- | rpkid/ext/POW.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/rpkid/ext/POW.c b/rpkid/ext/POW.c index 5c070ae2..64bd479f 100644 --- a/rpkid/ext/POW.c +++ b/rpkid/ext/POW.c @@ -6420,6 +6420,9 @@ manifest_object_add_files(manifest_object *self, PyObject *args) !sk_FileAndHash_push(self->manifest->fileList, fah)) lose_no_memory(); + fah->hash->flags &= ~7; + fah->hash->flags |= ASN1_STRING_FLAG_BITS_LEFT; + fah = NULL; Py_XDECREF(item); item = NULL; @@ -6492,18 +6495,16 @@ manifest_object_sign(manifest_object *self, PyObject *args) x509_object *signcert = NULL; PyObject *x509_sequence = Py_None; PyObject *crl_sequence = Py_None; - char *buf = NULL, *oid = NULL; - int len; + char *oid = NULL; unsigned flags = 0; BIO *bio = NULL; int ok = 0; ENTERING(manifest_object_sign); - if (!PyArg_ParseTuple(args, "O!O!s#|OOsI", + if (!PyArg_ParseTuple(args, "O!O!|OOsI", &POW_X509_Type, &signcert, &POW_Asymmetric_Type, &signkey, - &buf, &len, &x509_sequence, &crl_sequence, &oid, @@ -7106,8 +7107,7 @@ roa_object_sign(roa_object *self, PyObject *args) x509_object *signcert = NULL; PyObject *x509_sequence = Py_None; PyObject *crl_sequence = Py_None; - char *buf = NULL, *oid = NULL; - int len; + char *oid = NULL; unsigned flags = 0; BIO *bio = NULL; int ok = 0; @@ -7117,7 +7117,6 @@ roa_object_sign(roa_object *self, PyObject *args) if (!PyArg_ParseTuple(args, "O!O!s#|OOsI", &POW_X509_Type, &signcert, &POW_Asymmetric_Type, &signkey, - &buf, &len, &x509_sequence, &crl_sequence, &oid, |