Skip to content

Commit 7b48a13

Browse files
update README
1 parent d782897 commit 7b48a13

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

pkcs7/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,26 @@ Q31HIqX6H6JYdgtwHB1ZHaq+XS0lfLEGtsCqKKqTfNC9Q62RUBx7TfPk1w==
618618
-----END CERTIFICATE-----
619619
```
620620

621+
### Creating an SMIME bundle and verifying it
622+
623+
In these example cases the content will be overridden by the content found in the
624+
SMIME bundle. The smime application creates both a detatched
625+
(detatched-smime-created.p7s) and a non detatched bundle (smime-created.p7s).
626+
627+
Creating RSA signed bundles:
628+
629+
```
630+
./smime ../certs/client-key.der ../certs/client-cert.der
631+
./smime-verify smime-created.p7s ../certs/client-cert.der content.txt
632+
```
633+
634+
Creating ECC signed bundles:
635+
636+
```
637+
./smime ../certs/ecc-client-key.der ../certs/client-ecc-cert.der
638+
./smime-verify detached-smime-created.p7s ../certs/client-ecc-cert.der content.txt
639+
```
640+
621641
## Support
622642

623643
Please email wolfSSL support at support@wolfssl.com with any questions about

pkcs7/smime.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ int main(int argc, char** argv)
193193
return -1;
194194
}
195195

196+
#ifdef DEBUG_WOLFSSL
197+
wolfSSL_Debugging_ON();
198+
#endif
199+
196200
if (wolfSSL_Init() != WOLFSSL_SUCCESS) {
197201
printf("Failure to initialize wolfSSL library\n");
198202
return -1;
@@ -218,7 +222,7 @@ int main(int argc, char** argv)
218222

219223
/* create detached pkcs7 smime bundle */
220224
printf("\n");
221-
smimeSz = 3072;
225+
smimeSz = sizeof(smime);
222226
memset(smime, 0, smimeSz);
223227
if (ret == 0)
224228
ret = Create(smime, &smimeSz, key, keySz, cert, certSz,

0 commit comments

Comments
 (0)