1 /* 2 * TLS support header for CUPS on macOS. 3 * 4 * Copyright © 2007-2019 by Apple Inc. 5 * Copyright © 1997-2007 by Easy Software Products, all rights reserved. 6 * 7 * Licensed under Apache License v2.0. See the file "LICENSE" for more 8 * information. 9 */ 10 11 /**** This file is included from tls-darwin.c ****/ 12 13 extern char **environ; 14 15 #ifndef _SECURITY_VERSION_GREATER_THAN_57610_ 16 typedef CF_OPTIONS(uint32_t, SecKeyUsage) { 17 kSecKeyUsageAll = 0x7FFFFFFF 18 }; 19 #endif /* !_SECURITY_VERSION_GREATER_THAN_57610_ */ 20 extern const void * kSecCSRChallengePassword; 21 extern const void * kSecSubjectAltName; 22 extern const void * kSecCertificateKeyUsage; 23 extern const void * kSecCSRBasicContraintsPathLen; 24 extern const void * kSecCertificateExtensions; 25 extern const void * kSecCertificateExtensionsEncoded; 26 extern const void * kSecOidCommonName; 27 extern const void * kSecOidCountryName; 28 extern const void * kSecOidStateProvinceName; 29 extern const void * kSecOidLocalityName; 30 extern const void * kSecOidOrganization; 31 extern const void * kSecOidOrganizationalUnit; 32 extern bool SecCertificateIsValid(SecCertificateRef certificate, CFAbsoluteTime verifyTime); 33 extern CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate); 34 extern SecCertificateRef SecGenerateSelfSignedCertificate(CFArrayRef subject, CFDictionaryRef parameters, SecKeyRef publicKey, SecKeyRef privateKey); 35 extern SecIdentityRef SecIdentityCreate(CFAllocatorRef allocator, SecCertificateRef certificate, SecKeyRef privateKey); 36