⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cldapkeyserver.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.
	
	
	
	$Id: CLDAPKeyServer.h,v 1.7 2002/10/15 22:35:54 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CLDAPKeyServer_h
#define Included_CLDAPKeyServer_h

/* HP-UX aCC will not compile this file unless the ANSI C prototypes are used,
   otherwise it thinks that all of the functions defined in ldap.h have no
   arguments */
#if PGP_COMPILER_HPUX
#define NEEDPROTOS 1
#endif /* PGP_COMPILER_HPUX */

#include "pgpLDAP.h"

#include "CKeyServer.h"


class CLDAPKeyServer : public CKeyServer {
public:
							CLDAPKeyServer(PGPContextRef inContext,
								const char * inHostName,
								PGPUInt32 inHostAddress,PGPUInt16 inHostPort,
								PGPKeyServerProtocol inType,
								PGPKeyServerClass inClass,
								PGPKeyServerAccessType inAccessType,
								PGPKeyServerKeySpace inKeySpace,
								const char * inKeyStoreDN);
	virtual					~CLDAPKeyServer();
	
	virtual void			Cancel();

	virtual void			SetEventHandler(
								PGPEventHandlerProcPtr inCallback,
								PGPUserValue inUserData)
							{
								mLDAPPGPKeyServer->SetEventHandler(inCallback, inUserData);
								mEventHandler = inCallback;
								mEventHandlerData = inUserData;
							}

	virtual void			Open(PGPtlsSessionRef inTLSSession);
	virtual void			Close();

	virtual void			Query(PGPFilterRef inFilterRef,
								PGPKeyDBRef * outFoundKeys);
	virtual void			Upload(PGPKeyUploadPreference inSendPrivateKeys,
								PGPKeySetRef inKeysToUpload,
								PGPKeySetRef * outKeysThatFailed);
	virtual void			Delete(PGPKeySetRef inKeysToDelete,
								PGPKeySetRef * outKeysThatFailed);
	virtual void			Disable(PGPKeySetRef inKeysToDelete,
								PGPKeySetRef * outKeysThatFailed);
	virtual void			GetAccessType(PGPKeyServerAccessType &outAccessType)
							{ 
								if( mUseLDAPPGP )
									mLDAPPGPKeyServer->GetAccessType(outAccessType);
								else
									outAccessType = mAccessType;
							}
	virtual void			GetKeySpace(PGPKeyServerKeySpace &outKeySpace)
							{ 
								if( mUseLDAPPGP )
									mLDAPPGPKeyServer->GetKeySpace(outKeySpace);
								else
									outKeySpace = mKeySpace;
							}
	virtual void			SendGroups(PGPGroupSetRef inGroupSetRef);
	virtual void			RetrieveGroups(PGPGroupSetRef * outGroupSetRef);
	virtual void			NewMonitor(PGPKeyServerMonitor ** outMonitor);
	virtual void			FreeMonitor(PGPKeyServerMonitor * inMonitor);
								
protected:
	PGPContextRef			mContext;
	PGPKeyServerAccessType	mAccessType;
	PGPKeyServerKeySpace	mKeySpace;
	PGPldapContextRef		mLDAP;
	char *					mBaseKeySpaceDN;
	char *					mBasePendingDN;
	PGPExportFormat			mExportFormat;

	CKeyServer *			mLDAPPGPKeyServer;
	bool					mUseLDAPPGP;

	void					DeleteOrDisable(PGPBoolean inDelete,
								PGPKeySetRef inKeySet,
								PGPKeySetRef * outKeysThatFailed);
	PGPError				SendRequest(const char * inAction,
								PGPKeySetRef inKeySetRef,
								PGPKeySetRef * outKeysThatFailed);
};



#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -