| 130 | */ |
| 131 | |
| 132 | int /* O - Status of call (0 = success) */ |
| 133 | httpCopyCredentials( |
| 134 | http_t *http, /* I - Connection to server */ |
| 135 | cups_array_t **credentials) /* O - Array of credentials */ |
| 136 | { |
| 137 | DEBUG_printf(("httpCopyCredentials(http=%p, credentials=%p)", http, credentials)); |
| 138 | |
| 139 | if (!http || !http->tls || !http->tls->remoteCert || !credentials) |
| 140 | { |
| 141 | if (credentials) |
| 142 | *credentials = NULL; |
| 143 | |
| 144 | return (-1); |
| 145 | } |
| 146 | |
| 147 | *credentials = cupsArrayNew(NULL, NULL); |
| 148 | httpAddCredential(*credentials, http->tls->remoteCert->pbCertEncoded, http->tls->remoteCert->cbCertEncoded); |
| 149 | |
| 150 | return (0); |
| 151 | } |
| 152 | |
| 153 | |
| 154 | /* |
nothing calls this directly
no test coverage detected