PKIFHTTP Namespace Reference


Functions

void CAC_API AddBlacklistedHttpServer (std::string &server, bool bPermanent=true)
void CAC_API RemoveBlacklistedHttpServer (std::string &server)
bool CAC_API IsHttpServerBlacklisted (std::string &server)
void CAC_API ClearHttpServerBlacklist (void)
void CAC_API GetHttpServerBlacklist (std::vector< std::string > &bl)


Function Documentation

void CAC_API PKIFHTTP::AddBlacklistedHttpServer ( std::string &  server,
bool  bPermanent 
)

Interface: Subsystem

AddBlacklistedServer can be used to causes a particular server or URL to not be contacted when retrieving artifacts specified via CRL DP, AIA or SIA extensions. The typical usage by applications is to specify one or more LDAP directories that may appear in CRL DP extensions, as shown in the following example:

AddBlacklistedServer("NonResponsiveServer1.example.com"); AddBlacklistedServer("NonResponsiveServer2.example.com");

In this example, neither NonResponsiveServer1.example.com nor NonResponsiveServer1.example.com will be contacted when the server name appears in an LDAP URI.

Internally, AddBlacklistedServer is invoked with the bPermanent flag set to false. This will cause a resource to be blacklisted temporarily. The item will remain on the blacklist for 5 minutes past the last call to this function. Call to IsBlacklisted during that 5 minute window will return true. Calls to IsBlacklisted after the 5 minute window will return false.

Returns:
None
Parameters:
server  [in] hostname or URI to add to the blacklist
bPermanent  [in] true indicates the server should be permanently blacklisted, false indicates 5 minute blacklist

Definition at line 92 of file HttpServerBlacklist.cpp.

References CPKIFTime::CurrentTime(), g_autoHttpBlacklistedServers, g_blacklistedHttpServers, g_maxAutoHttpBlacklistEntries, g_numSecondsToLiveInHttpBlacklist, and CPKIFDuration::setSeconds().

Referenced by LoadStorageAndRetrievalComponents(), and PostRequestURL().

void CAC_API PKIFHTTP::ClearHttpServerBlacklist ( void   ) 

Interface: Subsystem

ClearServerBlacklist clears the blacklist of all values, including those added to the blacklist automatically.

Returns:
None

Definition at line 213 of file HttpServerBlacklist.cpp.

References g_autoHttpBlacklistedServers, and g_blacklistedHttpServers.

Referenced by LoadStorageAndRetrievalComponents().

void CAC_API PKIFHTTP::GetHttpServerBlacklist ( std::vector< std::string > &  bl  ) 

Interface: Subsystem

GetServerBlacklist retrieves the values from the blacklist, including those added to the blacklist automatically.

Returns:
None

Definition at line 226 of file HttpServerBlacklist.cpp.

References CPKIFTime::CurrentTime(), g_autoHttpBlacklistedServers, g_blacklistedHttpServers, g_numSecondsToLiveInHttpBlacklist, and CPKIFDuration::setSeconds().

Referenced by CPKIFPathLogger::LogPath(), CPKIFLdapAndOcspPanel::OnInitDialog(), and SaveStorageAndRetrievalComponents().

bool CAC_API PKIFHTTP::IsHttpServerBlacklisted ( std::string &  server  ) 

Interface: Subsystem

IsBlacklisted returns true if the value passed via the server parameter appears on the blacklist. If the value is on the blacklist but its temporary blacklist time has lapsed, the server will be removed from the blacklist and this function return false.

Returns:
True if server is on blacklist, false otherwise

Definition at line 176 of file HttpServerBlacklist.cpp.

References CPKIFTime::CurrentTime(), g_autoHttpBlacklistedServers, g_blacklistedHttpServers, g_numSecondsToLiveInHttpBlacklist, GetHostFromUri(), and CPKIFDuration::setSeconds().

Referenced by PostRequestURL().

void CAC_API PKIFHTTP::RemoveBlacklistedHttpServer ( std::string &  server  ) 

Interface: Subsystem

RemoveBlacklistedServer will remove the server specified by the server parameter from the blacklist. The value passed via server must be an exact match for the item in the blacklist. For example, if a server was added to the blacklist using a full URI it must be removed using a full URI and if a server was added using a hostname it must be removed using a hostname.

Returns:
None
Parameters:
server  [in] Server to remove from the blacklist.

Definition at line 153 of file HttpServerBlacklist.cpp.

References g_autoHttpBlacklistedServers, and g_blacklistedHttpServers.


Generated on Mon Nov 15 11:22:54 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6