00001 /* 00002 * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved. 00003 * This software is released under the modified BSD license. 00004 * See the file LICENSE in the top-level directory for details. 00005 */ 00006 // 00007 // $Id: Policy.h,v 1.3 2004/05/19 15:56:47 mmarsh Exp $ 00008 // 00009 // $Log: Policy.h,v $ 00010 // Revision 1.3 2004/05/19 15:56:47 mmarsh 00011 // *** empty log message *** 00012 // 00013 // Revision 1.2 2003/11/04 22:31:47 mmarsh 00014 // *** empty log message *** 00015 // 00016 // 00017 00018 #ifndef __CODEX_CIPHERS_POLICY_H__ 00019 #define __CODEX_CIPHERS_POLICY_H__ 00020 00021 #include "PolCredBase.h" 00022 #include "Credentials.h" 00023 00024 namespace CODEX_Ciphers 00025 { 00038 class Policy : public CODEX_ASN1::Base 00039 { 00040 public : 00042 Policy(); 00043 // /// Create Policy from a public key and a signature. 00044 // Policy( const RSAPublicKey& publicKey, 00045 // const RSASignature& signature ); 00046 // /* 00047 // * Create Policy from public and private keys and a hash function. 00048 // * \param publicKey The public key specifying the access policy. 00049 // * \param signingKey The private key used to authorize the policy. 00050 // * \param hashFunc The function used to create a digest of 00051 // * \e publicKey. 00052 // * \throws BignumNullException An error occurred allocating a new 00053 // * BIGNUM. 00054 // * \throws BignumBin2BNException An error occurred translating 00055 // * a character array to a BIGNUM. 00056 // */ 00057 // Policy( const RSAPublicKey& publicKey, 00058 // const RSAPrivateKey& signingKey, 00059 // const HashFunction& hashFunc ); 00061 Policy( const Policy& aPol ); 00063 virtual ~Policy() {} 00064 00066 void operator=( const Policy& aPol ); 00067 00074 bool verify( const Credentials& credentials ) const; 00075 00076 int marshal( unsigned char ** pp ) const; 00077 void* unmarshal( void* bogus, unsigned char ** pp, long length ); 00078 }; 00079 } 00080 00081 #endif /* __CODEX_CIPHERS_POLICY_H__ */
1.4.1