SOSPeerInfoDER.h
1 // 2 // SOSPeerInfoDER.h 3 // sec 4 // 5 // Created by Richard Murphy on 2/9/15. 6 // 7 // 8 9 #ifndef _sec_SOSPeerInfoDER_ 10 #define _sec_SOSPeerInfoDER_ 11 12 #include <corecrypto/ccder.h> 13 #include <utilities/der_date.h> 14 #include <Security/SecureObjectSync/SOSPeerInfo.h> 15 16 #include <stdio.h> 17 // 18 // DER Import Export 19 // 20 SOSPeerInfoRef SOSPeerInfoCreateFromDER(CFAllocatorRef allocator, CFErrorRef* error, 21 const uint8_t** der_p, const uint8_t *der_end); 22 23 SOSPeerInfoRef SOSPeerInfoCreateFromData(CFAllocatorRef allocator, CFErrorRef* error, 24 CFDataRef peerinfo_data); 25 26 size_t SOSPeerInfoGetDEREncodedSize(SOSPeerInfoRef peer, CFErrorRef *error); 27 uint8_t* SOSPeerInfoEncodeToDER(SOSPeerInfoRef peer, CFErrorRef* error, 28 const uint8_t* der, uint8_t* der_end); 29 30 CFDataRef SOSPeerInfoCopyEncodedData(SOSPeerInfoRef peer, CFAllocatorRef allocator, CFErrorRef *error); 31 32 #endif /* defined(_sec_SOSPeerInfoDER_) */