File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484This directory contains example wolfSSL configuration file templates for use when autoconf is not available, such as building with a custom IDE.
8585
8686See [ configs/README.md] ( configs/README.md ) for more details.
87+
88+ ## asn1
89+ This directory contains an example that prints the ASN.1 data of a BER/DER or PEM encoded file. Configure wolfSSL with ` --enable-asn-print ` .
90+
91+ ## pem
92+ This directory contains an example of converting to/from PEM and DER. Configure wolfSSL with ` --enable-coding `
Original file line number Diff line number Diff line change 3030#include <wolfssl/wolfcrypt/asn_public.h>
3131#include <wolfssl/wolfcrypt/coding.h>
3232#include <wolfssl/wolfcrypt/error-crypt.h>
33+ #include <stdio.h>
3334
34- #ifdef WOLFSSL_ASN_PRINT
35+ #if defined( WOLFSSL_ASN_PRINT ) && !defined( NO_FILESYSTEM )
3536
3637/* Increment allocated data by this much. */
3738#define DATA_INC_LEN 256
@@ -485,9 +486,9 @@ int main(int argc, char* argv[])
485486{
486487 (void )argc ;
487488 (void )argv ;
488- fprintf (stderr , "ASN.1 Parsing and Printing not compiled in.\n" );
489+ fprintf (stderr , "ASN.1 Parsing and Printing or file system not compiled"
490+ " in.\n" );
489491 return 0 ;
490492}
491493
492- #endif /* WOLFSSL_ASN_PRINT */
493-
494+ #endif /* WOLFSSL_ASN_PRINT && !defined(NO_FILESYSTEM)*/
Original file line number Diff line number Diff line change 3535#ifdef DEBUG_WOLFSSL
3636 #include <wolfssl/wolfcrypt/logging.h>
3737#endif
38+ #include <stdio.h>
3839
39- #ifdef WOLFSSL_PEM_TO_DER
40+ #if defined( WOLFSSL_PEM_TO_DER ) && !defined( NO_FILESYSTEM )
4041
4142/* Increment allocated data by this much. */
4243#define DATA_INC_LEN 256
@@ -1034,9 +1035,9 @@ int main(int argc, char* argv[])
10341035{
10351036 (void )argc ;
10361037 (void )argv ;
1037- fprintf (stderr , "PEM to DER conversion not compiled in.\n" );
1038+ fprintf (stderr , "PEM to DER conversion of file system support not compiled"
1039+ " in.\n" );
10381040 return 0 ;
10391041}
10401042
1041- #endif /* WOLFSSL_PEM_TO_DER */
1042-
1043+ #endif /* WOLFSSL_PEM_TO_DER && !NO_FILESYSTEM */
Original file line number Diff line number Diff line change @@ -1528,6 +1528,7 @@ extern void uITRON4_free(void *p) ;
15281528#ifdef MICRIUM
15291529 #include <stdlib.h>
15301530 #include <os.h>
1531+ #include <app_cfg.h>
15311532 #if defined(RTOS_MODULE_NET_AVAIL ) || (APP_CFG_TCPIP_EN == DEF_ENABLED )
15321533 #include <net_cfg.h>
15331534 #include <net_sock.h>
You can’t perform that action at this time.
0 commit comments