#ifndef _H_CDSA_CLIENT_DL_STANDARD
#define _H_CDSA_CLIENT_DL_STANDARD
#include <security_cdsa_client/dlclient.h>
namespace Security {
namespace CssmClient {
class DLCommonFields : public Record {
public:
DLCommonFields(const char * const * names);
string printName() const;
string alias() const;
};
class AllDLRecords : public DLCommonFields {
public:
AllDLRecords();
};
class GenericRecord : public DLCommonFields {
public:
GenericRecord();
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_GENERIC;
};
class GenericPasswordRecord : public DLCommonFields {
public:
GenericPasswordRecord();
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_GENERIC_PASSWORD;
};
class KeyRecord : public DLCommonFields {
public:
KeyRecord();
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_ALL_KEYS;
uint32 keyClass() const;
uint32 type() const;
uint32 size() const;
uint32 effectiveSize() const;
const CssmData &label() const;
const CssmData &applicationTag() const;
bool isPermanent() const;
bool isPrivate() const;
bool isModifiable() const;
bool isSensitive() const;
bool wasAlwaysSensitive() const;
bool isExtractable() const;
bool wasNeverExtractable() const;
bool canEncrypt() const;
bool canDecrypt() const;
bool canDerive() const;
bool canSign() const;
bool canVerify() const;
bool canWrap() const;
bool canUnwrap() const;
};
class PrivateKeyRecord : public KeyRecord {
public:
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_PRIVATE_KEY;
};
class PublicKeyRecord : public KeyRecord {
public:
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_PUBLIC_KEY;
};
class SymmetricKeyRecord : public KeyRecord {
public:
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_SYMMETRIC_KEY;
};
class X509CertRecord : public DLCommonFields {
public:
X509CertRecord();
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_X509_CERTIFICATE;
CSSM_CERT_TYPE type() const;
CSSM_CERT_ENCODING encoding() const;
const CssmData &subject() const;
const CssmData &issuer() const;
const CssmData &serial() const;
const CssmData &subjectKeyIdentifier() const;
const CssmData &publicKeyHash() const;
};
class UnlockReferralRecord : public DLCommonFields {
public:
UnlockReferralRecord();
static const CSSM_DB_RECORDTYPE recordType = CSSM_DL_DB_RECORD_UNLOCK_REFERRAL;
uint32 type() const;
string dbName() const;
const CssmData &dbNetname() const;
const Guid &dbGuid() const;
uint32 dbSSID() const;
uint32 dbSSType() const;
const CssmData &keyLabel() const;
const CssmData &keyApplicationTag() const;
};
} }
#endif // _H_CDSA_CLIENT_DL_STANDARD