| 1640 | */ |
| 1641 | |
| 1642 | void |
| 1643 | _httpTLSStop(http_t *http) /* I - Connection to server */ |
| 1644 | { |
| 1645 | int error; /* Error code */ |
| 1646 | |
| 1647 | |
| 1648 | error = gnutls_bye(http->tls, GNUTLS_SHUT_WR); |
| 1649 | if (error != GNUTLS_E_SUCCESS) |
| 1650 | _cupsSetError(IPP_STATUS_ERROR_INTERNAL, gnutls_strerror(errno), 0); |
| 1651 | |
| 1652 | gnutls_deinit(http->tls); |
| 1653 | http->tls = NULL; |
| 1654 | |
| 1655 | if (http->tls_credentials) |
| 1656 | { |
| 1657 | gnutls_certificate_free_credentials(*(http->tls_credentials)); |
| 1658 | free(http->tls_credentials); |
| 1659 | http->tls_credentials = NULL; |
| 1660 | } |
| 1661 | } |
| 1662 | |
| 1663 | |
| 1664 | /* |
nothing calls this directly
no test coverage detected