-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
pal_keychain_ios.h
48 lines (34 loc) · 1.54 KB
/
pal_keychain_ios.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#pragma once
#include "pal_compiler.h"
#include "pal_types.h"
#include <Security/Security.h>
/*
Enumerate the certificate objects within the given keychain.
Returns the last OSStatus value (noErr on success).
Output:
pCertsOut: When the return value is not noErr, NULL. Otherwise NULL on "no certs found", or a CFArrayRef for the matches
(including a single match).
*/
PALEXPORT int32_t AppleCryptoNative_SecKeychainEnumerateCerts(CFArrayRef* pCertsOut);
/*
Enumerate the certificate objects within the given keychain.
Returns the last OSStatus value (noErr on success).
Note that any identity will also necessarily be returned as a certificate with no private key by
SecKeychainEnumerateCerts. De-duplication of values is the responsibility of the caller.
Output:
pCertsOut: When the return value is not noErr, NULL. Otherwise NULL on "no certs found", or a CFArrayRef for the matches
(including a single match).
*/
PALEXPORT int32_t AppleCryptoNative_SecKeychainEnumerateIdentities(CFArrayRef* pIdentitiesOut);
/*
Add a certificate from the specified keychain.
Returns the last OSStatus value (noErr on success).
*/
PALEXPORT int32_t AppleCryptoNative_X509StoreAddCertificate(CFTypeRef certOrIdentity);
/*
Remove a certificate from the specified keychain.
Returns the last OSStatus value (noErr on success).
*/
PALEXPORT int32_t AppleCryptoNative_X509StoreRemoveCertificate(CFTypeRef certOrIdentity, uint8_t isReadOnlyMode);