diff options
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1040,6 +1040,24 @@ int do_inline_command_processing(char *buffer_ptr, size_t curr_bytes, } } +static void +print_other_info(gnutls_session_t session) +{ + int ret; + gnutls_datum_t data; + + if (HAVE_OPT(SAVE_OCSP)) { + FILE *fp = fopen(OPT_ARG(SAVE_OCSP), "w"); + + if (fp != NULL) { + ret = gnutls_ocsp_status_request_get(session, &data); + if (ret >= 0) + fwrite(data.data, 1, data.size, fp); + fclose(fp); + } + } +} + int main(int argc, char **argv) { int ret; @@ -1094,6 +1112,8 @@ int main(int argc, char **argv) if (try_resume(&hd)) return 1; + print_other_info(hd.session); + after_handshake: /* Warning! Do not touch this text string, it is used by external |