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

📄 pgpkeyserverprefs.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpKeyServerPrefs.h,v 1.10 2002/08/06 20:10:16 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_pgpKeyServerPrefs_h	/* [ */
#define Included_pgpKeyServerPrefs_h

#include "pgpPFLErrors.h"
#include "pflPrefs.h"
#include "pgpKeyServer.h"
#include "pgpKeys.h"

#define	kMaxServerNameLength	255
#define kMaxKeyStoreDNLength	255

#if PGP_MACINTOSH_PRAGMA
#pragma options align=mac68k
#endif

enum    PGPKeyServerEntryFlags
{
	kKeyServerListed		= 1,
	kKeyServerIsRoot		= 2
};

typedef struct PGPKeyServerEntry
{
	PGPKeyServerProtocol	protocol;
	PGPKeyServerClass		type;
	char					domain[kMaxServerNameLength + 1];
	char					serverDNS[kMaxServerNameLength + 1];
	PGPUInt16				serverPort;
	char					authKeyIDString[kPGPMaxKeyIDStringSize];
	PGPPublicKeyAlgorithm	authAlg;
	PGPUInt32				flags;
	char					keystoredn[kMaxKeyStoreDNLength + 1];
} PGPKeyServerEntry;

#define IsKeyServerListed(x)	((x & kKeyServerListed) != 0)
#define IsKeyServerRoot(x)		((x & kKeyServerIsRoot) != 0)
#define KeyServersAreEqual(x,y)	\
(	(x).protocol == (y).protocol && \
	(x).serverPort == (y).serverPort && \
	!strcmp((x).domain, (y).domain)	&& \
	!strcmp((x).serverDNS, (y).serverDNS) )

#if PGP_MACINTOSH
#pragma options align=reset
#endif

PGP_BEGIN_C_DECLARATIONS
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif

/*	
	returns an array of PGPKeyServerEntry structures 
	describing the keyservers in the default keyserver
	path and the number of structures in the array.

	keyserverList must be freed with PGPFreeKeyServerList()
*/
	PGPError
PGPGetKeyServerPrefs(	PGPPrefRef				prefRef,
						PGPKeyServerEntry		**keyserverList,
						PGPUInt32				*keyserverCount);

/*	
	given an array of PGPKeyServerEntry structures 
	describing the keyservers in the default keyserver
	path it saves them off for later retrieval.
	All domains should be grouped contiguously in the array.
*/
	PGPError
PGPSetKeyServerPrefs(	PGPPrefRef				prefRef,
						PGPKeyServerEntry		*keyserverList,
						PGPUInt32				keyserverCount);

/*
	convert a PGPPrefArray structure into an array of
	PGPKeyServerEntries.
*/
	PGPError
PGPGetKeyServerListFromPrefArray(	PGPPrefRef			prefRef,
									PGPPrefArray		*prefArray,
									PGPKeyServerEntry	**keyserverList,
									PGPUInt32			*keyserverCount);

/*
	Frees a key server list returned from PGPGetKeyServerPrefs.
*/
	PGPError
PGPFreeKeyServerList(	PGPKeyServerEntry		*keyserverList );

/*	
	given a domain (i.e. pgp.com), returns an array of 
	PGPKeyServerEntry structures describing the keyservers 
	in the keyserver path and the number of structures in 
	the array. The keyservers should be searched in the order 
	returned by the function.
*/

	PGPError
PGPCreateKeyServerPath(	PGPPrefRef				prefRef,
						const char*				searchDomain,
						PGPKeyServerEntry		**keyserverPath,
						PGPUInt32				*keyserverCount);
/*
	frees the array returned by PGPCreateKeyServerPath()
*/

	PGPError
PGPDisposeKeyServerPath(PGPKeyServerEntry *keyserverPath);

/* Returns root server */
	PGPError
PGPGetRootKeyServer(	PGPPrefRef			prefRef,
						PGPKeyServerEntry	*rootServer );

/* Utility returns DNS name prefixed by protocol URL identifier */

	void
PGPGetKeyServerURL(	PGPKeyServerEntry	*keyserver,
					char				*url );

/* Little utility function to extract the domain from an email address */

	void
PGPFindEmailDomain(const char *emailAddress, char *domain);



#if PRAGMA_IMPORT_SUPPORTED
#pragma import reset
#endif
PGP_END_C_DECLARATIONS


#endif /* ] Included_pgpKeyServerPrefs_h */

/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/

⌨️ 快捷键说明

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