#ifndef _ACL_KEYCHAIN
#define _ACL_KEYCHAIN
#include <Security/cssmacl.h>
#include "SecurityAgentClient.h"
#include <string>
class KeychainPromptAclSubject : public SimpleAclSubject {
static const Version pumaVersion = 0; static const Version jaguarVersion = 1; public:
bool validate(const AclValidationContext &baseCtx, const TypedList &sample) const;
CssmList toList(CssmAllocator &alloc) const;
KeychainPromptAclSubject(string description, const CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR &selector);
void exportBlob(Writer::Counter &pub, Writer::Counter &priv);
void exportBlob(Writer &pub, Writer &priv);
IFDUMP(void debugDump() const);
class Maker : public AclSubject::Maker {
public:
Maker(CSSM_ACL_SUBJECT_TYPE type = CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT)
: AclSubject::Maker(type) { }
KeychainPromptAclSubject *make(const TypedList &list) const;
KeychainPromptAclSubject *make(Version version, Reader &pub, Reader &priv) const;
};
private:
CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR selector; string description;
private:
static CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR defaultSelector;
typedef uint32 VersionMarker;
static const VersionMarker currentVersion = 0x3BD5910D;
bool isLegacyCompatible() const;
};
#endif //_ACL_KEYCHAIN