From: Michael R Sweet Date: Fri, 28 Sep 2018 20:52:32 +0000 (-0400) Subject: Move private header includes to tls-darwin.c. X-Git-Tag: v2.3b6~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3903a94c60930d2454e36dc949ab5f8f169f2f3;p=thirdparty%2Fcups.git Move private header includes to tls-darwin.c. --- diff --git a/cups/http-private.h b/cups/http-private.h index e7f7e445fe..b486e38558 100644 --- a/cups/http-private.h +++ b/cups/http-private.h @@ -72,60 +72,13 @@ typedef int socklen_t; # include # include # include -# ifdef HAVE_SECURETRANSPORTPRIV_H -# include -# endif /* HAVE_SECURETRANSPORTPRIV_H */ # ifdef HAVE_SECITEM_H # include # endif /* HAVE_SECITEM_H */ -# ifdef HAVE_SECBASEPRIV_H -# include -# endif /* HAVE_SECBASEPRIV_H */ # ifdef HAVE_SECCERTIFICATE_H # include # include # endif /* HAVE_SECCERTIFICATE_H */ -# ifdef HAVE_SECCERTIFICATEPRIV_H -# include -# else -# ifdef __cplusplus -extern "C" { -# endif /* __cplusplus */ -# ifndef _SECURITY_VERSION_GREATER_THAN_57610_ -typedef CF_OPTIONS(uint32_t, SecKeyUsage) { - kSecKeyUsageAll = 0x7FFFFFFF -}; -# endif /* !_SECURITY_VERSION_GREATER_THAN_57610_ */ -extern const void * kSecCSRChallengePassword; -extern const void * kSecSubjectAltName; -extern const void * kSecCertificateKeyUsage; -extern const void * kSecCSRBasicContraintsPathLen; -extern const void * kSecCertificateExtensions; -extern const void * kSecCertificateExtensionsEncoded; -extern const void * kSecOidCommonName; -extern const void * kSecOidCountryName; -extern const void * kSecOidStateProvinceName; -extern const void * kSecOidLocalityName; -extern const void * kSecOidOrganization; -extern const void * kSecOidOrganizationalUnit; -extern SecCertificateRef SecCertificateCreateWithBytes(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length); -extern bool SecCertificateIsValid(SecCertificateRef certificate, CFAbsoluteTime verifyTime); -extern CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate); -extern SecCertificateRef SecGenerateSelfSignedCertificate(CFArrayRef subject, CFDictionaryRef parameters, SecKeyRef publicKey, SecKeyRef privateKey); -extern SecIdentityRef SecIdentityCreate(CFAllocatorRef allocator, SecCertificateRef certificate, SecKeyRef privateKey); -# ifdef __cplusplus -} -# endif /* __cplusplus */ -# endif /* HAVE_SECCERTIFICATEPRIV_H */ -# ifdef HAVE_SECITEMPRIV_H -# include -# endif /* HAVE_SECITEMPRIV_H */ -# ifdef HAVE_SECIDENTITYSEARCHPRIV_H -# include -# endif /* HAVE_SECIDENTITYSEARCHPRIV_H */ -# ifdef HAVE_SECPOLICYPRIV_H -# include -# endif /* HAVE_SECPOLICYPRIV_H */ # elif defined(HAVE_SSPISSL) # include # include diff --git a/cups/tls-darwin.c b/cups/tls-darwin.c index e8c448081d..75996d2e6e 100644 --- a/cups/tls-darwin.c +++ b/cups/tls-darwin.c @@ -15,7 +15,50 @@ #include -extern char **environ; /* @private@ */ +extern char **environ; + + +#ifdef HAVE_SECURETRANSPORTPRIV_H +# include +#endif /* HAVE_SECURETRANSPORTPRIV_H */ +#ifdef HAVE_SECBASEPRIV_H +# include +#endif /* HAVE_SECBASEPRIV_H */ +#ifdef HAVE_SECCERTIFICATEPRIV_H +# include +#else +# ifndef _SECURITY_VERSION_GREATER_THAN_57610_ +typedef CF_OPTIONS(uint32_t, SecKeyUsage) { + kSecKeyUsageAll = 0x7FFFFFFF +}; +# endif /* !_SECURITY_VERSION_GREATER_THAN_57610_ */ +extern const void * kSecCSRChallengePassword; +extern const void * kSecSubjectAltName; +extern const void * kSecCertificateKeyUsage; +extern const void * kSecCSRBasicContraintsPathLen; +extern const void * kSecCertificateExtensions; +extern const void * kSecCertificateExtensionsEncoded; +extern const void * kSecOidCommonName; +extern const void * kSecOidCountryName; +extern const void * kSecOidStateProvinceName; +extern const void * kSecOidLocalityName; +extern const void * kSecOidOrganization; +extern const void * kSecOidOrganizationalUnit; +extern SecCertificateRef SecCertificateCreateWithBytes(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length); +extern bool SecCertificateIsValid(SecCertificateRef certificate, CFAbsoluteTime verifyTime); +extern CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate); +extern SecCertificateRef SecGenerateSelfSignedCertificate(CFArrayRef subject, CFDictionaryRef parameters, SecKeyRef publicKey, SecKeyRef privateKey); +extern SecIdentityRef SecIdentityCreate(CFAllocatorRef allocator, SecCertificateRef certificate, SecKeyRef privateKey); +#endif /* HAVE_SECCERTIFICATEPRIV_H */ +#ifdef HAVE_SECITEMPRIV_H +# include +#endif /* HAVE_SECITEMPRIV_H */ +#ifdef HAVE_SECIDENTITYSEARCHPRIV_H +# include +#endif /* HAVE_SECIDENTITYSEARCHPRIV_H */ +#ifdef HAVE_SECPOLICYPRIV_H +# include +#endif /* HAVE_SECPOLICYPRIV_H */ /*