MCPcopy Create free account
hub / github.com/OpenPrinting/cups / httpCredentialsAreValidForName

Function httpCredentialsAreValidForName

cups/tls-openssl.c:418–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416 */
417
418int // O - 1 if valid, 0 otherwise
419httpCredentialsAreValidForName(
420 cups_array_t *credentials, // I - Credentials
421 const char *common_name) // I - Name to check
422{
423 X509 *cert; // Certificate
424 int result = 0; // Result
425
426
427 cert = http_create_credential((http_credential_t *)cupsArrayFirst(credentials));
428 if (cert)
429 {
430 result = X509_check_host(cert, common_name, strlen(common_name), 0, NULL);
431
432 X509_free(cert);
433 }
434
435 return (result);
436}
437
438
439/*

Callers 1

httpCredentialsGetTrustFunction · 0.70

Calls 2

http_create_credentialFunction · 0.85
cupsArrayFirstFunction · 0.85

Tested by

no test coverage detected