📄 provider.h
字号:
// provider.h// defines the SecurityProvider interface, which maps provider names// to implementations// copyright SafeTP Development Group, Inc., 2000 Terms of use are as specified in license.txt#ifndef __PROVIDER_H#define __PROVIDER_H#include "security.h" // {Data,Control}Securitystruct KeyEnvironment; // keydb.h// top-level security mechanism; provides objects to manage the// control and data channelsclass SecurityProvider {public: static const char* const Mechanisms[]; // a null-terminated list of names of security mechanisms available; // the client will try these in order; terminated by a NULL entry // returns a new instance of a security provider matching 'name' // (this function implemented in provider.cc) static SecurityProvider *findSecurityMechanism( char const *name, // name of mechanism (well-known) KeyEnvironment *env, // key policy and db for client, NULL for server IPAddress myAddress, // IP address as peer knows me (part of authentication) IPAddress peerAddress // IP address of peer (for client-side key lookups) ); virtual ControlSecurity &control() = 0; // control-channel security virtual DataSecurity &data() = 0; // data-channel security virtual ~SecurityProvider() {} // these things are allocated with new in provider.cpp};// useful for testing/debugging; see .cpp file for usage, etc.bool testAdatExchange(SecurityProvider *source, SecurityProvider *dest, bool echo);void testAdatNegotiation(SecurityProvider *server, SecurityProvider *client, bool echo);#endif // __PROVIDER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -