aboutsummaryrefslogtreecommitdiff
path: root/pow
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-05-01 22:01:49 +0000
committerRob Austein <sra@hactrn.net>2008-05-01 22:01:49 +0000
commit28515c2b9a0c9b6f29632134676981831c3e183a (patch)
tree72df35f8609cbfebcb726f2b09c4751f4ad5a2d7 /pow
parent4801c8504bac462ade16cbb82199a1c49268b4e6 (diff)
Debugging with stone knives and bearskins.
svn path=/pow/POW-0.7/POW.c; revision=1735
Diffstat (limited to 'pow')
-rw-r--r--pow/POW-0.7/POW.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/pow/POW-0.7/POW.c b/pow/POW-0.7/POW.c
index b17f1cd5..5b9a272e 100644
--- a/pow/POW-0.7/POW.c
+++ b/pow/POW-0.7/POW.c
@@ -287,6 +287,16 @@ typedef struct {
/*========== helper functions ==========*/
/*
+ * Minimal intervention debug-by-printf() hack, use only for good.
+ */
+
+#if 0
+#define KVETCH(_msg_) write(2, _msg_ "\n", sizeof(_msg_))
+#else
+#define KVETCH(_msg_)
+#endif
+
+/*
* Error handling macros. These macros make two assumptions:
*
* 1) All the macros assume that there's a cleanup label named
@@ -6936,9 +6946,13 @@ CMS_object_sign(cms_object *self, PyObject *args)
if (!crlobj->crl)
lose("CRL object with null crl field!");
+ KVETCH("CMS_object_sign(): About to call CMS_add0_crl()");
+
if (!CMS_add0_crl(self->cms, crlobj->crl))
lose_openssl_error("could not add CRL to CMS");
+ KVETCH("CMS_object_sign(): Survived call to CMS_add0_crl()");
+
CRYPTO_add(&crlobj->crl->references, 1, CRYPTO_LOCK_X509_CRL);
assert_no_unhandled_openssl_errors();
@@ -6958,8 +6972,10 @@ CMS_object_sign(cms_object *self, PyObject *args)
* for now we discard it and move on.
*/
err = ERR_peek_error();
- if (ERR_GET_LIB(err) == ERR_LIB_EVP && ERR_GET_FUNC(err) == EVP_F_EVP_PKEY_CTX_CTRL && ERR_GET_REASON(err) == EVP_R_COMMAND_NOT_SUPPORTED)
+ if (ERR_GET_LIB(err) == ERR_LIB_EVP && ERR_GET_FUNC(err) == EVP_F_EVP_PKEY_CTX_CTRL && ERR_GET_REASON(err) == EVP_R_COMMAND_NOT_SUPPORTED) {
+ KVETCH("CMS_object_sign(): Ignoring EVP_R_COMMAND_NOT_SUPPORTED");
ERR_get_error(); /* Discard this error */
+ }
assert_no_unhandled_openssl_errors();
@@ -7055,8 +7071,10 @@ CMS_object_verify(cms_object *self, PyObject *args)
* for now we discard it and move on.
*/
err = ERR_peek_error();
- if (ERR_GET_LIB(err) == ERR_LIB_EVP && ERR_GET_FUNC(err) == EVP_F_EVP_PKEY_CTX_CTRL && ERR_GET_REASON(err) == EVP_R_COMMAND_NOT_SUPPORTED)
+ if (ERR_GET_LIB(err) == ERR_LIB_EVP && ERR_GET_FUNC(err) == EVP_F_EVP_PKEY_CTX_CTRL && ERR_GET_REASON(err) == EVP_R_COMMAND_NOT_SUPPORTED) {
+ KVETCH("CMS_object_verify(): Ignoring EVP_R_COMMAND_NOT_SUPPORTED");
ERR_get_error(); /* Discard this error */
+ }
assert_no_unhandled_openssl_errors();