#include <Security/SecBasePriv.h>
#include <Security/SecOTR.h>
#include <Security/SecOTRSession.h>
+#include <Security/SecOTRSessionPriv.h>
#include <Security/SecureObjectSync/SOSInternal.h>
#include <Security/SecureObjectSync/SOSFullPeerInfo.h>
#include <Security/SecureObjectSync/SOSPeerInfo.h>
}
}
-/*
- static void logRawCoderMessage(const uint8_t* der, uint8_t* der_end, bool encoding)
-{
-#ifndef NDEBUG
- CFStringRef hexMessage = NULL;
- if (der && der_end) {
- CFIndex length = der_end - der;
- CFDataRef message = CFDataCreate(kCFAllocatorDefault, der, length);
- hexMessage = CFDataCopyHexString(message);
- secnoticeq("coder", "%s RAW [%ld] %@", encoding ? "encode" : "decode", length, hexMessage);
- CFReleaseSafe(message);
- }
- CFReleaseSafe(hexMessage);
-#endif
-}
-*/
-
static CFMutableDataRef sessSerializedCreate(SOSCoderRef coder, CFErrorRef *error) {
CFMutableDataRef otr_state = NULL;
return result;
}
+bool SOSCoderIsCoderInAwaitingState(SOSCoderRef coder){
+ return SecOTRSessionIsSessionInAwaitingState(coder->sessRef);
+}
CFDataRef SOSCoderCopyDER(SOSCoderRef coder, CFErrorRef* error) {
CFMutableDataRef encoded = NULL;