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

📄 pgpclientlibwin32.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
📖 第 1 页 / 共 5 页
字号:
//	convert a PGP photoID to DIB and copy to the clipboard
//
//	Entry parameters :
//		hwnd		- HWND that will own the clipboard
//		pBuf		- buffer containing PGP photoID data
//		iLen		- length of buffer in bytes

PGPError PGPclExport
PGPclCopyPhotoToClipboard (
		PGPContextRef	context,
		HWND			hwnd,
		PGPByte*		pBuf,
		PGPInt32		iLen);

//
//	convert DIB data in clipboard to a PGP photoID
//
//	Entry parameters :
//		hwnd		- HWND that will own the clipboard
//		ppBuf		- pointer to pointer which will receive address of buffer
//		piLen		- pointer to int which will receive length of buffer

PGPError PGPclExport
PGPclPastePhotoFromClipboard (
		PGPContextRef	context,
		HWND			hwnd,
		PGPByte**		ppBuf,
		PGPInt32*		piLen);

//
//	convert DIB data in file to a PGP photoID
//
//	Entry parameters :
//		pszFileName	- full path of file to read
//		ppBuf		- pointer to pointer which will receive address of buffer
//		piLen		- pointer to int which will receive length of buffer

PGPError PGPclExport
PGPclReadPhotoFromFile (
		PGPContextRef	context,
		char*			pszFileName,
		PGPByte**		ppBuf,
		PGPInt32*		piLen);


//	_______________________________________________________
//
//	Keyserver convenience functions

typedef enum PGPclServerType
{
	kPGPclSpecifiedServer			= 0,
	kPGPclUserIDBasedServer			= 1,
	kPGPclDefaultServer				= 2,
	kPGPclRootServer				= 3,
	kPGPclAllServers				= 4
} PGPclServerType;

//
//	Searches keyserver prefs for specifed keyserver and replaces
//	authentication key.
//
//	Entry parameters :
//		keyserver					keyserver data to put in prefs file

PGPError PGPclExport
PGPclSyncKeyserverPrefs (
		PGPContextRef		context,
		PGPKeyServerEntry*	keyserver);

//
//	Searches keyservers (as defined in prefs file) for all
//	keys in the specified keyset.
//
//	Entry parameters :
//		hwndParent			parent window
//		keysetToUpdate		keyset with keys to update
//		uServer				one of above-defined server constants
//		keydbMain			keydb to which tls key is added
//		pkeydbUpdated		buffer to receive PGPKeyDBRef of updated keys

PGPError PGPclExport
PGPclUpdateKeySetFromServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeySetRef		keysetToUpdate,
		PGPclServerType		servertype,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBRef*		pkeydbUpdated);

//
//	Searches keyservers (as defined in prefs file) for the
//	specified userid string.
//
//	Entry parameters :
//		hwndParent			parent window
//		szUserID			string containing userid info
//		uServer				one of above-defined server constants
//		keydbMain			keydb to which tls key is added
//		pkeydbFound			buffer to receive PGPKeyDBRef of found keys

PGPError PGPclExport
PGPclSearchServerForUserID (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		char*				szUserID,
		PGPclServerType		servertype,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBRef*		pkeydbFound);

//
//	Searches default keyserver for the keyids in the list.
//
//	Entry parameters :
//		hwndParent			parent window
//		pkeyidList			array of PGPKeyID
//		iNumKeyIDs			number of PGPKeyIDs in list
//		uServer				one of above-defined server constants
//		keydbMain			keydb to which tls key is added
//		pkeydbFound			buffer to receive PGPKeyDBRef of found keys

PGPError PGPclExport
PGPclSearchServerForKeyIDs (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyID*			pkeyidList,
		PGPInt32			iNumKeyIDs,
		PGPclServerType		servertype,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBRef*		pkeydbFound);

//
//	Searches default keyserver using the specified filter.
//
//	Entry parameters :
//		hwndParent			parent window
//		filter				filter to use for search
//		uServer				one of above-defined server constants
//		keydbMain			keydb to which tls key is added
//		pkeydbFound			buffer to receive PGPKeyDBRef of found keys

PGPError PGPclExport
PGPclSearchServerWithFilter (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPFilterRef		filter,
		PGPclServerType		servertype,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBRef*		pkeydbFound);

//
//	Sends keys in keyset to the specified keyserver
//
//	Entry parameters :
//		hwndParent			parent window
//		szServerURL			server to send to
//		uServer				one of above-defined server constants
//							or zero to use pkeyserver
//		pkeyserver			server to send to (if uServer == 0)
//		keydbMain			keydb to which tls key is added and
//								which contains signing keys
//		keysetToSend		keyset with keys to send

PGPError PGPclExport
PGPclSendKeysToServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPclServerType		servertype,
		PGPKeyServerEntry*	pkeyserver,
		PGPKeyDBRef			keydbMain,
		PGPKeySetRef		keysetToSend);

//
//	Sends keys in keydb to the root keyserver with notifications
//
//	Entry parameters :
//		hwndToReceiveNotifications	window to get WM_NOTIFYs
//		szServerURL					server to send to
//		keydbMain					keydb to which tls key is added and
//										which contains signing keys
//		keysetToSend				keyset with keys to send
//
//	returns kPGPError_NoErr.  Progress notifications and final
//	results are sent to window in form of WM_NOTIFY messages

//  keyserver notifications to be placed in PGPclServerEvent.nmhdr.code
enum
{
	kPGPclNotifyServerDone				= 0,
	kPGPclNotifyServerProgress			= 1,
	kPGPclNotifyServerAbort				= 2,
	kPGPclNotifyServerError				= 3
};

typedef struct _PGPclServerEvent
{
	NMHDR		nmhdr;
	VOID*		pData;
	BOOL		cancel;
	LONG		step;
	LONG		total;
	CHAR		szmessage[256];
} PGPclServerEvent, *PPGPclServerEvent;

#define kPGPServerInfinite		-1L

PGPError PGPclExport
PGPclSendKeysToRootServerNotify (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndToReceiveNotifications,
		PGPKeyDBRef			keydbMain,
		PGPKeySetRef		keysetToSend);

//
//	Deletes keys in keyset from the specified keyserver
//
//	Entry parameters :
//		hwndParent			parent window
//		szServerURL			server to send to
//		space				pending or active bucket
//		keydbMain			keydb to which tls key is added and
//								which contains signing keys
//		keydbToDelete		keydb with keys to delete

PGPError PGPclExport
PGPclDeleteKeysFromServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyServerEntry*	pkeyserver,
		PGPInt32			iSpace,
		PGPKeyDBRef			keydbMain,
		PGPKeySetRef		keysetToDelete);

//
//	Disables keys in keyset on the specified keyserver
//
//	Entry parameters :
//		hwndParent			parent window
//		szServerURL			server to send to
//		space				pending or active bucket
//		keydbMain			keydb to which tls key is added and
//								which contains signing keys
//		keysetToDisable		keyset with keys to disable

PGPError PGPclExport
PGPclDisableKeysOnServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyServerEntry*	pkeyserver,
		PGPInt32			iSpace,
		PGPKeyDBRef			keydbMain,
		PGPKeySetRef		keysetToDisable);

//
//	Downloads a new groupset from the root server
//
//	Entry parameters :
//		hwndParent			parent window
//		keydbMain			keydb to which tls key is added and
//								which contains signing keys
//		groupsetDownloaded	newly downloaded groupset

PGPError PGPclExport
PGPclGetGroupsFromRootServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBRef			keydbMain,
		PGPGroupSetRef*		groupsetDownloaded);

//
//	Downloads a new groupset from the root server
//
//	Entry parameters :
//		hwndParent			parent window
//		keydbMain			keydb to which tls key is added and
//								which contains signing keys
//		groupsetToSend		groupset to send to root server

PGPError PGPclExport
PGPclSendGroupsToRootServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBRef			keydbMain,
		PGPGroupSetRef		groupsetToSend);

//
//	Create and send certificate request to CA server
//
//	Entry parameters :
//		hwndParent			parent window
//		keydbMain			main keydb
//		userid				userid for which request will be made
//		keysetKey			keyset containing single key to request
//								certificate for

PGPError PGPclExport
PGPclSendCertificateRequestToServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBObjRef		userid,
		PGPKeySetRef		keysetKey);

//
//	Create and send certificate request to CA server with notifications
//
//	Entry parameters :
//		hwndToNotify		window to receive progress notifications
//		keydbMain			main keydb
//		userid				userid for which request will be made
//		keysetKey			keyset containing single key to request
//								certificate for
//		pszPassPhrase		passphrase of key in keydbKey

PGPError PGPclExport
PGPclSendCertificateRequestToServerNotify (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndToNotify,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBObjRef		userid,
		PGPKeySetRef		keysetKey,
		char*				pszPassPhrase);

//
//	Get the previously-requested certificate from the CA server
//
//	Entry parameters :
//		hwndParent			parent window
//		keysetKey			keyset containing single key for whic request
//								was previously made
//		userid				userid to retrieve certificate for
//		pkeydbCert			buffer to receive PGPKeyDBRef of found cert

PGPError PGPclExport
PGPclRetrieveCertificateFromServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBRef			keydbMain,
		PGPKeySetRef		keysetKey,
		PGPKeyDBObjRef		userid,
		PGPByte*			pPasskey,
		PGPSize				sizePasskey,
		PGPKeyDBRef*		pkeydbCert);

//
//	Create and send certificate request to CA server
//
//	Entry parameters :
//		hwndParent			parent window
//		keydbMain			main keydb containing CA root key

PGPError PGPclExport
PGPclGetCertificateRevocationsFromServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBRef			keydbMain);

//
//	Create certificate request AV list
//
//	Entry parameters :
//		hwnd				parent window
//		bAdminCaller		TRUE=>being called from PGPadmin
//		userid				userid of key for which cert req is made
//								or kInvalidPGPUserID
//		serverclass			class of CA server or kPGPKeyServerClass_Invalid
//		puRequestType		CRS vs. PKCS10
//		pAVlist				receives pointer to AVlist
//		pNumAVs				receives number of AVs in list

PGPError PGPclExport
PGPclGetCACertRequestAVList (
		HWND				hwnd,
		PGPContextRef		context,
		PGPBoolean			bAdminCaller,
		PGPKeyDBObjRef		userid,
		PGPKeyServerClass	serverclass,
		PGPUInt32*			puRequestType,
		PGPAttributeValue**	ppAVlist,
		PGPUInt32*			pNumAVs);

//
//	Free AV list previously returned by PGPclGetCACertRequestAVList
//
//	Entry parameters :
//		pAVlist				pointer to AVlist
//		NumAVs				number of AVs in list

PGPError PGPclExport
PGPclFreeCACertRequestAVList (
		PGPAttributeValue*	pAVlist,
		PGPUInt32			uNumAVs);

//
//	return a string description of a given attribute type
//
//	Entry parameters :
//		attr				attribute
//		psz					string buffer to fill
//		uLen				size of string buffer
//
//	Note: returns kPGPError_ItemNotFound if no string available for attribute

PGPError PGPclExport
PGPclGetAVListAttributeString (
		PGPAVAttribute		attr,
		char*				psz,
		PGPUInt32			uLen);

//
//	Create and send key reconstruction blob to server
//
//	Entry parameters :
//		hwndParent			parent window
//		key					keypair for which to send blob
//		prompts, passes		data for creating blob

PGPError PGPclExport
PGPclSendReconstructionBlobToServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBObjRef		key,
		PGPKeyDBRef			keydbMain);

//
//	Create and send key reconstruction blob to server with notifications
//
//	Entry parameters :
//		hwndParent			parent window
//		key					keypair for which to send blob
//		prompts, passes		data for creating blob
//		pszPassphrase		passphrase of key

PGPError PGPclExport
PGPclSendReconstructionBlobToServerNotify (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndToNotify,
		PGPKeyDBObjRef		key,
		PGPKeyDBRef			keydbMain,
		PGPReconPrompts		prompts,
		PGPReconPasses		passes,
		char*				pszPassPhrase);

//
//	Get the previously-requested certificate from the CA server
//
//	Entry parameters :
//		hwndParent			parent window
//		key					key for which to retrieve blob
//		pkeydbReconstructed	buffer to receive PGPKeyDBRef of reconstructed key

PGPError PGPclExport
PGPclRetrieveReconstructedKeyFromServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPKeyDBObjRef		key,
		PGPKeyDBRef			keydbMain,
		PGPKeyDBRef*		pkeydbReconstructed);

//
//	Send the prefs to the server specified as kPGPPrefLDAPPrefsServer
//
//	Entry parameters :
//		hwndParent			parent window
//		prefref				client prefref to send
//		prefrefNet			net prefref to send

PGPError PGPclExport
PGPclSendPrefsToServer (
		PGPContextRef		context,
		PGPtlsContextRef	tlscontext,
		HWND				hwndParent,
		PGPPrefRef			prefref,
		PGPPrefRef			prefrefNet,
		PGPKeyDBRef			keydbMain);

//

⌨️ 快捷键说明

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