certificateIsPermanentlyAccepted()
The function certificateIsPermanentlyAccepted() returns TRUE if the given certificate was already permanently accepted, e.g. by the user.
Synopsis
bool certificateIsPermanentlyAccepted(string
digest);
Parameter
Parameter | Description |
---|---|
digest | Contains a string representing a calculated digest value for this certificate, which is used to unambiguously identify this certificate. Use the net() functions netGet(),netHead(), netPost() or netPut() to return the mapping sslErrors2 that contains the digest. The sslErrors2 is returned in case of SSL errors. |
Return Value
The function certificateIsPermanentlyAccepted() returns TRUE if the given certificate was already permanently accepted.
Description
The function certificateIsPermanentlyAccepted() returns TRUE if the given certificate was already permanently accepted, e.g. by the user on the dialog when contacting an HTTP server. The function serves for detecting certificate errors.
example
This example checks if the certificate was permanently accepted. First netGet() is called and it returns the digest in a mapping in case of SSL errors. The mapping sslErrors2 contains the digest.
main(mapping event)
{
mapping m;
netGet("https://localhost:443/pictures/picture.png", m, makeMapping("target","D:/Test"));
DebugN(m);
}
main(mapping event)
{
DebugN("certificateIsPermanentlyAccepted", certificateIsPermanentlyAccepted("52bfdc363d0832f1a38cfcb612779bf69e4c8d8d"));
}
Assignment
Security functions
Availability
UI