| 1455 | // output once this is sent. |
| 1456 | |
| 1457 | static void start_ssl_shutdown(pn_transport_t *transport) |
| 1458 | { |
| 1459 | pni_ssl_t *ssl = transport->ssl; |
| 1460 | assert(ssl->network_out_pending == 0); |
| 1461 | if (ssl->queued_shutdown) |
| 1462 | return; |
| 1463 | ssl->queued_shutdown = true; |
| 1464 | ssl_log(transport, PN_LEVEL_INFO, "Shutting down SSL connection..."); |
| 1465 | |
| 1466 | DWORD shutdown = SCHANNEL_SHUTDOWN; |
| 1467 | SecBuffer shutBuff; |
| 1468 | shutBuff.cbBuffer = sizeof(DWORD); |
| 1469 | shutBuff.BufferType = SECBUFFER_TOKEN; |
| 1470 | shutBuff.pvBuffer = &shutdown; |
| 1471 | SecBufferDesc desc; |
| 1472 | desc.ulVersion = SECBUFFER_VERSION; |
| 1473 | desc.cBuffers = 1; |
| 1474 | desc.pBuffers = &shutBuff; |
| 1475 | ApplyControlToken(&ssl->ctxt_handle, &desc); |
| 1476 | |
| 1477 | // Next handshake will generate the shutdown alert token |
| 1478 | ssl_handshake(transport); |
| 1479 | } |
| 1480 | |
| 1481 | static void rewind_sc_inbuf(pni_ssl_t *ssl) |
| 1482 | { |
no test coverage detected