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

Function http_cdsa_default_path

cups/tls-darwin.c:2005–2027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2003 */
2004
2005static const char * /* O - Keychain path */
2006http_cdsa_default_path(char *buffer, /* I - Path buffer */
2007 size_t bufsize) /* I - Size of buffer */
2008{
2009 _cups_globals_t *cg = _cupsGlobals();
2010 /* Pointer to library globals */
2011
2012
2013 /*
2014 * Determine the default keychain path. Note that the login and system
2015 * keychains are no longer accessible to user applications starting in macOS
2016 * 10.11.4 (!), so we need to create our own keychain just for CUPS.
2017 */
2018
2019 if (cg->home)
2020 snprintf(buffer, bufsize, "%s/.cups/ssl.keychain", cg->home);
2021 else
2022 strlcpy(buffer, "/etc/cups/ssl.keychain", bufsize);
2023
2024 DEBUG_printf(("1http_cdsa_default_path: Using default path \"%s\".", buffer));
2025
2026 return (buffer);
2027}
2028
2029
2030/*

Callers 2

http_cdsa_open_keychainFunction · 0.85

Calls 1

_cupsGlobalsFunction · 0.85

Tested by

no test coverage detected