// SECCFUNCTIONS macro to retarget SecKeyRef to foreign object instead of normal way through SecCFObject.
static KeyItem *required(SecKeyRef ptr);
static KeyItem *optional(SecKeyRef ptr);
- operator CFTypeRef() const throw();
+ operator CFTypeRef() const _NOEXCEPT;
static SecCFObject *fromSecKeyRef(CFTypeRef ref);
void attachSecKeyRef() const;
void initializeWithSecKeyRef(SecKeyRef ref);
} // end namespace Security
-struct OpaqueSecKeyRef {
- CFRuntimeBase _base;
- const SecKeyDescriptor *key_class;
- SecKeyRef cdsaKey;
- Security::KeychainCore::KeyItem *key;
+class CDSASecKey : public __SecKey {
+public:
+ static Security::KeychainCore::KeyItem *keyItem(SecKeyRef key) {
+ CDSASecKey *cdsaKey = static_cast<CDSASecKey *>(key);
+ return static_cast<Security::KeychainCore::KeyItem *>(cdsaKey->key);
+ }
+ SecCredentialType credentialType;
+ Mutex *cdsaKeyMutex;
};
#endif // !_SECURITY_KEYITEM_H_