From 80c19aaf334de0b8fbec5b6b677ef36a5064d501 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 14 Jan 2014 22:46:54 -0700 Subject: [PATCH] add PKCS7 error codes --- ctaocrypt/src/error.c | 8 ++++++++ cyassl/ctaocrypt/error.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/ctaocrypt/src/error.c b/ctaocrypt/src/error.c index 449a9b583..d7ed45194 100644 --- a/ctaocrypt/src/error.c +++ b/ctaocrypt/src/error.c @@ -335,6 +335,14 @@ void CTaoCryptErrorString(int error, char* buffer) XSTRNCPY(buffer, "Setting cert request attributes error", max); break; + case PKCS7_OID_E: + XSTRNCPY(buffer, "PKCS#7 error: mismatched OID value", max); + break; + + case PKCS7_RECIP_E: + XSTRNCPY(buffer, "PKCS#7 error: no matching recipient found", max); + break; + default: XSTRNCPY(buffer, "unknown error number", max); diff --git a/cyassl/ctaocrypt/error.h b/cyassl/ctaocrypt/error.h index d99ac3d72..af4d8e9c8 100644 --- a/cyassl/ctaocrypt/error.h +++ b/cyassl/ctaocrypt/error.h @@ -119,6 +119,9 @@ enum { REQ_ATTRIBUTE_E = -194, /* setting cert request attributes error */ + PKCS7_OID_E = -195, /* PKCS#7, mismatched OID error */ + PKCS7_RECIP_E = -196, /* PKCS#7, recipient error */ + MIN_CODE_E = -200 /* errors -101 - -199 */ };