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

📄 pgpikepriv.h

📁 pgp soucecode pgp soucecode
💻 H
📖 第 1 页 / 共 2 页
字号:
	PGPSize						cipherSize;
	PGPBoolean					singleDESMode;
	PGPByte						skeyid[kPGPike_MaxHashSize];
	PGPByte						skeyid_d[kPGPike_MaxHashSize];
	PGPByte						skeyid_a[kPGPike_MaxHashSize];
	PGPByte						skeyid_e[kPGPike_MaxHashSize];
	PGPByte						cipherKey[kPGPike_MaxKeySize];
	PGPCBCContextRef			cbc;
	PGPByte						lastP1CBC[kPGPike_MaxCipherBlockSize];
	PGPSize						cipherBlockSize;
	
	PGPipsecDOIOptions			ipsecOpts;
		
	PGPikeExchange *			exchanges;
} PGPikePartner;

/* the non-opaque PGPikeContext */
typedef struct PGPikeContextPriv
{
	PGPContextRef				pgpContext;
	PGPMemoryMgrRef				memMgr;
	
	PGPBoolean					cookieDough;
	PGPByte						cookieSecret[kPGPike_CookieSize];
	PGPikeMessageProcPtr		msgProc;
	void *						userData;
	PGPikeDestination *			pending;
	PGPUInt32					numExchanges;
	
	PGPUInt32					kbLifeTimeIKE;
	PGPUInt32					secLifeTimeIKE;
	PGPUInt32					kbLifeTimeIPSEC;
	PGPUInt32					secLifeTimeIPSEC;
	
	PGPUInt32					numIKEProps;
	PGPikeTransform	*			defaultIKEProps;
	PGPUInt32					numIPSECProps;
	PGPipsecTransform	*		defaultIPSECProps;
	PGPikeAllowedAlgorithms		allowedAlgorithms;
		
	PGPikePartner *				partner;
	PGPikeSA *					sa;
} PGPikeContextPriv;


PGPError pgpIKEIdle(
	PGPikeContextPriv *		ike );
PGPError pgpIKEHandleSARequest(
	PGPikeContextPriv *		ike,
	PGPikeMTSASetup *		saReq );
PGPError pgpIKESARequestFailed(
	PGPikeContextPriv *		ike,
	PGPikeMTSAFailed *		saf );
PGPError pgpIKEAddPending(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPUInt32				ipAddrStart,
	PGPUInt32				ipMaskEnd,
	PGPBoolean				destIsRange );
PGPBoolean pgpIKEFindPending(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPUInt32				ipAddrStart,
	PGPUInt32				ipMaskEnd,
	PGPBoolean				destIsRange );
PGPError pgpIKERemovePending(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPUInt32				ipAddrStart,
	PGPUInt32				ipMaskEnd,
	PGPBoolean				destIsRange );
PGPError pgpIKEStartIdentityExchange(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPikeMTSASetup *		saSetup,
	PGPBoolean				destIsRange,
	PGPUInt32				ipAddrStart,
	PGPUInt32				ipMaskEnd );
PGPError pgpIKEStartQMExchange(
	PGPikePartner *		partner,
	PGPikeExchange **	exchangeP );
PGPError pgpIKEHandleSAEvent(
	PGPikeContextPriv *		ike,
	PGPBoolean				death,
	PGPikeSA *				sa );
PGPError pgpIKEFindSAPartner(
	PGPikeContextPriv *		ike,
	PGPikeSA *				sa,
	PGPBoolean				mustBeReady,
	PGPikePartner **		partnerP );
PGPError pgpIKEFreeSA(
	PGPikeContextPriv *		ike,
	PGPikeSA *				sa );
PGPError pgpIKEKillSA(
	PGPikePartner **		pPartner,
	PGPikeSA *				sa );
PGPError pgpIKEHandlePacket(
	PGPikeContextPriv *		ike,
	PGPikeMTPacket *		packet );
PGPError pgpIKEProcessPayloads(
	PGPikeExchange *		exchange,
	PGPikePayload			firstPayload,
	PGPByte *				mp );
PGPError pgpIKEProcessCertRequest(
	PGPikeExchange **		exchangeP,
	PGPByte *				pp,
	PGPSize					payLen );
PGPError pgpIKEProcessP2ID(
	PGPikeExchange *		exchange,
	PGPByte *				inIDBody,
	PGPSize					inIDBodySize,
	PGPBoolean *			outIsRange,
	PGPUInt32 *				ipStart,
	PGPUInt32 *				ipEnd );
PGPError pgpIKEProcessSig(
	PGPikeExchange **		exchangeP,
	PGPByte *				pp,
	PGPSize					payLen );
PGPError pgpIKEProcessCert(
	PGPikeExchange **		exchangeP,
	PGPByte *				pp,
	PGPSize					payLen );
PGPError pgpIKEProcessKE(
	PGPikeExchange **		exchangeP,
	PGPByte *				pp,
	PGPSize					payLen );
PGPError pgpIKEProcessProposal(
	PGPikeExchange **		exchangeP,
	PGPByte *				mp,
	PGPByte *				ep,
	PGPikeAlert	*			alert,
	PGPikeProposal **		proposal );
PGPError pgpIKESelectProposal(
	PGPikeExchange *		exchange,
	PGPikeProposal *		proposal,
	PGPBoolean *			isValid );
void pgpIKEGetAttribute(
	PGPByte **				mpp,
	PGPikeAttributeType *	attribute,
	PGPUInt32 *				value );
PGPError pgpIKEAbortExchange(
	PGPikeExchange **		exchangeP,
	PGPikeAlert				alert );
PGPError pgpIKEInitialContact(
	PGPikeExchange *		exchange );
PGPError pgpIKEResponderLifetime(
	PGPikeExchange *		exchange,
	PGPByte *				pp,
	PGPByte *				ep );
PGPError pgpIKEProcessInformational(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPikeExchange **		exchangeP,
	PGPikeNDPayload *		nd );
PGPError pgpIKEHeaderSniffer(
	PGPikeContextPriv *		ike,
	PGPikeMTPacket *		packet,
	PGPBoolean *			isValid );
PGPError pgpIKEPayloadLengthCheck(
	PGPikePartner *			partner,
	PGPikePayload			payload,
	PGPByte *				mp,
	PGPByte *				ep,
	PGPBoolean *			isValid );
PGPError pgpIKEDoPacket(
	PGPikeExchange **		exchangeP,
	PGPikePayload			firstPayload,
	... );
PGPError pgpIKEAddIDPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddCertPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddCertRequestPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddSigPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddNoncePayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddSAPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
PGPError pgpIKEAddProposalPayload(
	PGPikeExchange *		exchange,
	PGPikeProposal *		proposal,
	PGPByte **				mpp );
PGPError pgpIKEAddTransformPayload(
	PGPikeProposal *		proposal,
	PGPikeGenericTransform *transform,
	PGPByte **				mpp );
PGPError pgpIKEAddKEPayload(
	PGPikeExchange *		exchange,
	PGPByte **				mpp );
void pgpIKEAddAttribute(
	PGPikeAttributeType		attribute,
	PGPUInt32				value,
	PGPByte **				mpp );
PGPError pgpIKELocalAlert(
	PGPikeContextPriv *		ike,
	PGPUInt32				ipAddress,
	PGPikeAlert				alert,
	PGPikeInternalAlert		value,
	PGPBoolean				remote );
PGPError pgpIKESendPacket(
	PGPikeExchange *		exchange,
	PGPByte *				packet,
	PGPSize					packetSize  );
PGPError pgpIKESendPacket1(
	PGPikePartner *			partner,
	PGPByte *				packet,
	PGPSize					packetSize );
PGPError pgpIKEResendLastPacket(
	PGPikeExchange *		exchange );
PGPError pgpIKEBakeCookie(
	PGPikeContextPriv *		ike,
	PGPUInt32				destAddress,
	PGPUInt32				srcAddress,
	PGPByte *				outCookie );
PGPError pgpIKEGetCert(
	PGPikePartner *			partner,
	PGPikeMessageType		msg );
PGPError pgpIKESAEstablished(
	PGPikeContextPriv *		ike,
	PGPikeSA *				sa );
PGPError pgpIKECreatePartner(
	PGPikeContextPriv *		ike,
	PGPikeMTSASetup *		setup,
	PGPBoolean				initiator,
	PGPikePartner **		partnerP );
PGPError pgpIKECreateExchange(
	PGPikePartner *			partner,
	PGPikeExchangeT			exchangeT,
	PGPikeMessageID *		messageID,
	PGPikeState				state,
	PGPBoolean				initiator,
	PGPikeExchange **		exchangeP );
PGPError pgpIKECreateProposals(
	PGPikeExchange *		exchange );
PGPError pgpIKEFreePartner(
	PGPikePartner *			partner );
PGPError pgpIKEFreeExchange(
	PGPikeExchange *		exchange );
PGPError pgpIKELoadGroup(
	PGPikeExchange *		exchange );
PGPError pgpIKEModP(
	PGPikeExchange *		exchange );
PGPError pgpIKEGoSecure(
	PGPikeExchange *		exchange );
PGPError pgpIKECompletePhase2(
	PGPikeExchange *		exchange,
	PGPikeSA **				sa );
PGPError pgpIKEGetAuthHash(
	PGPikeExchange *		exchange,
	PGPBoolean				initiator,
	PGPByte *				outHash );
PGPError pgpIKEGetP2Keymat(
	PGPikeExchange *		exchange,
	PGPipsecDOIParams *		ipsec );
PGPBoolean pgpIKEIsTransformValid(
	PGPikePartner *					partner,
	PGPipsecProtocol				protocol,
	const PGPikeGenericTransform *	transform );
PGPBoolean pgpIKEIsTransformEqual(
	PGPipsecProtocol				protocol,
	const PGPikeGenericTransform *	transform1,
	const PGPikeGenericTransform *	transform2 );
PGPError pgpIKESetPref(
	PGPikeContextPriv *		ike,
	PGPikeMTPref *			pref );
void pgpIKEDebugLog(
	PGPikeContextPriv *		ike,
	char *					fmt,
	... );
void pgpIKEDebugData(
	PGPikeContextPriv *		ike,
	char *					name,
	PGPByte *				data,
	PGPSize					length );
char * pgpIKEPayloadTypeString(
	PGPikePayload			payload );
char * pgpIKEExchangeTypeString(
	PGPikeExchangeT			exchange );
char * pgpIKEAuthMethodString(
	PGPikeAuthMethod		auth );
char * pgpIKECipherString(
	PGPikeCipher			cipher );
char * pgpIKEIDTypeString(
	PGPipsecIdentity		id );
char * pgpIKEHashTypeString(
	PGPikeHash				hash );
char * pgpIKEGroupTypeString(
	PGPikeGroupID			group );
char * pgpIKEipsecAuthTypeString(
	PGPipsecAuthAttribute	auth );
char * pgpIKEipsecCipherTypeString(
	PGPipsecESPTransformID	cipher );

#endif /* ] Included_pgpIKEPriv_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 + -