]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/lib/KeyItem.h
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / KeyItem.h
index a1a6716ce58b6686c9f2f7a80d76a6fb8b7f5a95..326279d95fe951dd7bc425ba150e613f9f073aaf 100644 (file)
@@ -46,7 +46,7 @@ public:
     // SECCFUNCTIONS macro to retarget SecKeyRef to foreign object instead of normal way through SecCFObject.
     static KeyItem *required(SecKeyRef ptr);
     static KeyItem *optional(SecKeyRef ptr);
     // 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);
     static SecCFObject *fromSecKeyRef(CFTypeRef ref);
     void attachSecKeyRef() const;
     void initializeWithSecKeyRef(SecKeyRef ref);
@@ -164,11 +164,12 @@ private:
 
 } // end namespace Security
 
 
 } // 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;
 };
     SecCredentialType credentialType;
     Mutex *cdsaKeyMutex;
 };