]> git.saurik.com Git - apple/security.git/blob - keychain/escrowrequest/EscrowRequestXPCProtocol.m
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / escrowrequest / EscrowRequestXPCProtocol.m
1
2 #import <Foundation/Foundation.h>
3 #import <objc/runtime.h>
4 #import <Security/SecXPCHelper.h>
5
6 #import "keychain/escrowrequest/EscrowRequestXPCProtocol.h"
7 #import "utilities/debugging.h"
8
9 NSXPCInterface* SecEscrowRequestSetupControlProtocol(NSXPCInterface* interface) {
10 NSSet<Class>* errClasses = [SecXPCHelper safeErrorClasses];
11
12 @try {
13 [interface setClasses:errClasses forSelector:@selector(triggerEscrowUpdate:reply:) argumentIndex:0 ofReply:YES];
14 [interface setClasses:errClasses forSelector:@selector(cachePrerecord:serializedPrerecord:reply:) argumentIndex:0 ofReply:YES];
15 [interface setClasses:errClasses forSelector:@selector(fetchPrerecord:reply:) argumentIndex:1 ofReply:YES];
16 [interface setClasses:errClasses forSelector:@selector(fetchRequestWaitingOnPasscode:) argumentIndex:1 ofReply:YES];
17 [interface setClasses:errClasses forSelector:@selector(fetchRequestStatuses:) argumentIndex:1 ofReply:YES];
18 [interface setClasses:errClasses forSelector:@selector(resetAllRequests:) argumentIndex:0 ofReply:YES];
19 [interface setClasses:errClasses forSelector:@selector(storePrerecordsInEscrow:) argumentIndex:1 ofReply:YES];
20
21 }
22 @catch(NSException* e) {
23 secerror("SecEscrowRequestSetupControlProtocol failed, continuing, but you might crash later: %@", e);
24 @throw e;
25 }
26
27 return interface;
28 }
29