]> git.saurik.com Git - apple/securityd.git/blobdiff - src/key.cpp
securityd-55199.3.tar.gz
[apple/securityd.git] / src / key.cpp
index c418e36c004e8ac49cd116a8b3922af41cb51acd..04a9208680381d388b92e1431bd9159bfcb2097f 100644 (file)
@@ -3,8 +3,6 @@
  * 
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
 
 
 //
-// key - representation of SecurityServer key objects
+// key - representation of securityd key objects
 //
 #include "key.h"
 #include "server.h"
-#include "database.h"
 #include <security_cdsa_utilities/acl_any.h>
 
 
-Key::Key()
-       : SecurityServerAcl(keyAcl, Allocator::standard())
-{
-}
-
-
-Database &Key::database() const
-{
-       return referent<Database>();
-}
-
-
-//
-// Form a KeySpec with checking and masking
-//
-Key::KeySpec::KeySpec(uint32 usage, uint32 attrs)
-       : CssmClient::KeySpec(usage, (attrs & ~managedAttributes) | forcedAttributes)
-{
-       if (attrs & generatedAttributes)
-               CssmError::throwMe(CSSMERR_CSP_INVALID_KEYATTR_MASK);
-}
-
-Key::KeySpec::KeySpec(uint32 usage, uint32 attrs, const CssmData &label)
-       : CssmClient::KeySpec(usage, (attrs & ~managedAttributes) | forcedAttributes, label)
+Key::Key(Database &db)
+       : Database::Subsidiary(db)
 {
-       if (attrs & generatedAttributes)
-               CssmError::throwMe(CSSMERR_CSP_INVALID_KEYATTR_MASK);
 }