fix feature detection in CMS examples
parent
1cc35553b6
commit
832f18b9f2
|
@ -28,6 +28,8 @@
|
|||
|
||||
#define encodedFilePWRI "authEnvelopedDataPWRI.der"
|
||||
|
||||
#if defined(HAVE_PKCS7) && !defined(NO_PWDBASED)
|
||||
|
||||
static const byte data[] = { /* Hello World */
|
||||
0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,
|
||||
0x72,0x6c,0x64
|
||||
|
@ -175,8 +177,6 @@ static int authEnvelopedData_decrypt(byte* in, word32 inSz, byte* cert,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PKCS7
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret;
|
||||
|
@ -233,5 +233,5 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 & NO_PWDBASED */
|
||||
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
|
||||
#define compressedFile "compressedData.der"
|
||||
|
||||
#if defined(HAVE_PKCS7) && defined(HAVE_LIBZ) && \
|
||||
!defined(NO_PKCS7_COMPRESSED_DATA)
|
||||
|
||||
static const byte data[] = { /* Hello World */
|
||||
0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,
|
||||
0x72,0x6c,0x64
|
||||
|
@ -112,8 +115,6 @@ static int compressedData_decode(byte* in, word32 inSz, byte* out, word32 outSz)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PKCS7
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int compressedSz, decodedSz;
|
||||
|
@ -157,5 +158,5 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 & HAVE_LIBZ & !NO_PKCS7_COMPRESSED_DATA */
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#if defined(HAVE_PKCS7) && !defined(NO_PWDBASED)
|
||||
|
||||
#define encodedFilePWRI "envelopedDataPWRI.der"
|
||||
|
||||
static const byte data[] = { /* Hello World */
|
||||
|
@ -142,8 +144,6 @@ static int envelopedData_decrypt(byte* in, word32 inSz, byte* out, word32 outSz)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PKCS7
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int encryptedSz, decryptedSz;
|
||||
|
@ -188,5 +188,5 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 & !NO_PWDBASED */
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
#define encodedFileNoAttrs "signedCompressedFPD_noattrs.der"
|
||||
#define encodedFileAttrs "signedCompressedFPD_attrs.der"
|
||||
|
||||
#if defined(HAVE_PKCS7) && defined(HAVE_LIBZ) && \
|
||||
!defined(NO_PKCS7_COMPRESSED_DATA)
|
||||
|
||||
static const byte data[] = { /* Hello World */
|
||||
0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,
|
||||
0x72,0x6c,0x64
|
||||
|
@ -251,8 +254,6 @@ static int signedData_verify(byte* in, word32 inSz, byte* cert,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PKCS7
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret;
|
||||
|
@ -312,5 +313,5 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 & HAVE_LIBZ & !NO_PKCS7_COMPRESSED_DATA */
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#if defined(HAVE_PKCS7) && defined(HAVE_LIBZ) && \
|
||||
!defined(NO_PKCS7_ENCRYPTED_DATA) && !defined(NO_PKCS7_COMPRESSED_DATA)
|
||||
|
||||
#define certFile "../certs/client-cert.der"
|
||||
#define keyFile "../certs/client-key.der"
|
||||
#define encodedFileNoAttrs "signedEncryptedCompressedFPD_noattrs.der"
|
||||
|
@ -291,8 +294,6 @@ static int signedData_verify(byte* in, word32 inSz, byte* cert,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PKCS7
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret;
|
||||
|
@ -356,5 +357,5 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_PKCS7 & HAVE_LIBZ & !NO_PKCS7_ENCRYPTED_DATA */
|
||||
|
||||
|
|
Loading…
Reference in New Issue