]> git.saurik.com Git - apple/security.git/blobdiff - OSX/sec/Security/SecItemBackup.h
Security-58286.1.32.tar.gz
[apple/security.git] / OSX / sec / Security / SecItemBackup.h
index 5cf8fc69e9e028fd2cec3d68169c598fd77f3942..b6b73679efea618a0816e0a266af302270e17b84 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <CoreFoundation/CFError.h>
 #include <CoreFoundation/CFString.h>
+#include <CoreFoundation/CFURL.h>
 
 __BEGIN_DECLS
 
@@ -105,6 +106,26 @@ CFDictionaryRef SecItemBackupCopyMatching(CFDataRef keybag, CFDataRef secret, CF
 // Utility function to compute a confirmed manifest from a v0 backup dictionary.
 CFDataRef SecItemBackupCreateManifest(CFDictionaryRef backup, CFErrorRef *error);
 
+/*!
+ @function SecBackupKeybagAdd
+ @abstract Add a new asymmetric keybag to the backup table.
+ @param passcode User entropy to protect the keybag.
+ @param identifier Unique identifier for the keybag.
+ @param pathinfo The directory or file containing the keychain.
+ @param error Returned if there is a failure.
+ @result bool standard CFError contract.
+ @discussion The keybag is created and stored in the backup keybag table */
+bool SecBackupKeybagAdd(CFDataRef passcode, CFDataRef *identifier, CFURLRef *pathinfo, CFErrorRef *error);
+
+/*!
+ @function SecBackupKeybagDelete
+ @abstract Remove an asymmetric keybag from the backup table.
+ @param query Specify which keybag(s) to delete
+ @param error Returned if there is a failure.
+ @result bool standard CFError contract.
+ @discussion The keychain must be unlocked */
+bool SecBackupKeybagDelete(CFDictionaryRef query, CFErrorRef *error);
+
 __END_DECLS
 
 #endif /* _SECURITY_ITEMBACKUP_H_ */