MCPcopy Create free account
hub / github.com/apache/qpid-proton / ssl_failed

Function ssl_failed

c/src/ssl/schannel.cpp:426–442  ·  view source on GitHub ↗

unrecoverable SSL failure occured, notify transport and generate error code.

Source from the content-addressed store, hash-verified

424
425// unrecoverable SSL failure occured, notify transport and generate error code.
426static int ssl_failed(pn_transport_t *transport, const char *reason)
427{
428 char buf[512] = "Unknown error.";
429 if (!reason) {
430 HRESULT status = GetLastError();
431
432 FormatMessage(FORMAT_MESSAGE_MAX_WIDTH_MASK | FORMAT_MESSAGE_FROM_SYSTEM,
433 0, status, 0, buf, sizeof(buf), 0);
434 reason = buf;
435 }
436 pni_ssl_t *ssl = transport->ssl;
437 ssl->ssl_closed = true;
438 ssl->app_input_closed = ssl->app_output_closed = PN_EOS;
439 ssl->state = SSL_CLOSED;
440 pn_do_error(transport, "amqp:connection:framing-error", "SSL Failure: %s", reason);
441 return PN_EOS;
442}
443
444static pn_ssl_session_t *ssn_cache_find( pn_ssl_domain_t *domain, const char *id )
445{

Callers 5

ssl_decryptFunction · 0.70
client_handshake_initFunction · 0.70
client_handshakeFunction · 0.70
server_handshakeFunction · 0.70
grow_inbuf2Function · 0.70

Calls 1

pn_do_errorFunction · 0.85

Tested by

no test coverage detected