PKIFNSSRawCryptContext.h

Go to the documentation of this file.
00001 
00009 #ifndef __PKIFNSSCRYPTCONTEXT_H__
00010 #define __PKIFNSSCRYPTCONTEXT_H__
00011 
00012 #include "PKIFdll.h"
00013 #include "IPKIFRawCryptContext.h"
00014 #include "IPKIFCryptContext.h"
00015 
00016 
00017 #include "PKIFNSSConfig.h"
00018 #include "nspr.h"
00019 
00020 
00021 FD_SMART_PTR(CPKIFCredential);
00022 
00023 class CPKIFNSSRaw;
00024 class CPKIFNSS;
00033 class CPKIFNSSRawCryptContext :
00034     public IPKIFRawCryptContext
00035 {
00036     friend class CPKIFNSSRaw;
00037 public:
00038     virtual ~CPKIFNSSRawCryptContext(void);
00039 
00040 private:
00042     CPKIFNSSRawCryptContext& operator=(const CPKIFNSSRawCryptContext& rhs);
00044     CPKIFNSSRawCryptContext(void);  //disallow creation except by friend class
00045     void clear(void);
00046 
00047     // true if the context was created with key material from a cert
00048     bool m_bFromCert;
00049 
00050     // NSS slot
00051     PK11SlotInfo * m_slot;
00052     // NSS context
00053     PK11Context * m_ctx;
00054     // NSS algorithm parameters
00055     SECItem * m_param;
00056     // NSS symmetric key reference
00057     PK11SymKey * m_sk;
00058     // NSS alg/mode/pad identifier
00059     CK_MECHANISM_TYPE m_mech;
00060 
00061 
00062     // true if PKIF will be performing the padding
00063     bool m_bNeedsPad;
00064     // these fields are only valid for contexts where
00065     // PKIF performs the padding (i.e. all ECB contexts)
00066     // bytes hanging around to be padded upon final
00067     unsigned char * m_padbuf;
00068     // number of bytes currently in the padding buffer
00069     int m_padlen;
00070     // size of a cipher block for this context
00071     int m_blocksize;
00072 };
00073 
00074 #endif
00075 
00076 
00077 

Generated on Mon Nov 15 11:15:55 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6