MCPcopy Create free account
hub / github.com/SmingHub/Sming / validate

Method validate

Sming/Components/ssl/src/ValidatorList.cpp:18–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace Ssl
17{
18bool ValidatorList::validate(const Certificate* certificate)
19{
20 if(certificate == nullptr) {
21 removeAllElements();
22 return false;
23 }
24
25 if(isEmpty()) {
26 debug_w("SSL Validator: list empty, allow connection");
27 return true;
28 }
29
30 bool success = false;
31 while(!isEmpty()) {
32 if(!success) {
33 success = operator[](0).validate(*certificate);
34 }
35 remove(0);
36 }
37
38 debug_w("SSL validator: %s", success ? _F("Success") : _F("NO match"));
39
40 return success;
41}
42
43} // namespace Ssl

Callers 1

validateCertificateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected