Fix bssl client -session-out.
It was switched to using the callbacks, but the callbacks require SSL_SESS_CACHE_CLIENT be set. (We should possibly just stop conditioning the callback on that bit since it doesn't do anything.) Change-Id: I96277b8a75975a86393260a6291eafc9cb2c6a78 Reviewed-on: https://boringssl-review.googlesource.com/10805 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
2aae802d2a
commit
7072884350
@ -256,10 +256,12 @@ bool Client(const std::vector<std::string> &args) {
|
||||
if (args_map.count("-session-out") != 0) {
|
||||
session_out.reset(BIO_new_file(args_map["-session-out"].c_str(), "wb"));
|
||||
if (!session_out) {
|
||||
fprintf(stderr, "Error while saving session:\n");
|
||||
fprintf(stderr, "Error while opening %s:\n",
|
||||
args_map["-session-out"].c_str());
|
||||
ERR_print_errors_cb(PrintErrorCallback, stderr);
|
||||
return false;
|
||||
}
|
||||
SSL_CTX_set_session_cache_mode(ctx.get(), SSL_SESS_CACHE_CLIENT);
|
||||
SSL_CTX_sess_set_new_cb(ctx.get(), NewSessionCallback);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user