Commit 7ddc463fb5eb84b1de3c2982123379ec860a33f5
1 parent
3119aee5
Exists in
master
and in
1 other branch
Adding SSL build options to the trace info.
Showing
1 changed file
with
45 additions
and
0 deletions
Show diff stats
src/core/toggles/init.c
| ... | ... | @@ -96,6 +96,47 @@ static void toggle_connect(H3270 *hSession, const struct lib3270_toggle *toggle, |
| 96 | 96 | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | +static void toggle_ssl_trace(H3270 *hSession, const struct lib3270_toggle *toggle, LIB3270_TOGGLE_TYPE tt) { | |
| 100 | + | |
| 101 | + if(tt != LIB3270_TOGGLE_TYPE_INITIAL && toggle->value) { | |
| 102 | + | |
| 103 | + trace_ssl(hSession, | |
| 104 | + "SSL build options:\n" \ | |
| 105 | + " self signed cert check is %s" \ | |
| 106 | + "\n CRL check is %s" \ | |
| 107 | + "\n CRL expiration check is %s" \ | |
| 108 | + "\n Notify when failed is %s\n", | |
| 109 | + | |
| 110 | +#ifdef SSL_ENABLE_SELF_SIGNED_CERT_CHECK | |
| 111 | + "on", | |
| 112 | +#else | |
| 113 | + "off", | |
| 114 | +#endif | |
| 115 | + | |
| 116 | +#ifdef SSL_ENABLE_CRL_CHECK | |
| 117 | + "on", | |
| 118 | +#else | |
| 119 | + "off", | |
| 120 | +#endif | |
| 121 | + | |
| 122 | +#ifdef SSL_ENABLE_CRL_EXPIRATION_CHECK | |
| 123 | + "on", | |
| 124 | +#else | |
| 125 | + "off", | |
| 126 | +#endif | |
| 127 | + | |
| 128 | +#ifdef SSL_ENABLE_NOTIFICATION_WHEN_FAILED | |
| 129 | + "on" | |
| 130 | +#else | |
| 131 | + "off" | |
| 132 | +#endif | |
| 133 | + ); | |
| 134 | + | |
| 135 | + } | |
| 136 | + | |
| 137 | +} | |
| 138 | + | |
| 139 | + | |
| 99 | 140 | /** |
| 100 | 141 | * @brief Called from system initialization code to handle initial toggle settings. |
| 101 | 142 | */ |
| ... | ... | @@ -131,6 +172,10 @@ void initialize_toggles(H3270 *session) { |
| 131 | 172 | { |
| 132 | 173 | LIB3270_TOGGLE_CONNECT_ON_STARTUP, |
| 133 | 174 | toggle_connect |
| 175 | + }, | |
| 176 | + { | |
| 177 | + LIB3270_TOGGLE_SSL_TRACE, | |
| 178 | + toggle_ssl_trace | |
| 134 | 179 | } |
| 135 | 180 | |
| 136 | 181 | }; | ... | ... |