certificateAcceptPermanently()
The function marks the given digest as "permanently accepted" and stores this information on the hard disk.
Synopsis
int certificateAcceptPermanently(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(), netDelete() or netPut() to return the mapping sslErrors2 that contains the digest. The sslErrors2 is returned in case of SSL errors. |
Return Value
The function returns 0 if the given digest was marked as "permanently accepted" and stores this information on the hard disk.
Description
The function marks the given digest as "permanently accepted" and stores this information on the hard disk. The function serves for detecting certificate errors.
example
This example marks the given digest as "permanently accepted" and stores this information on the hard disk. 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("certificateAcceptPermanently", certificateAcceptPermanently("52bfdc363d0832f1a38cfcb612779bf69e4c8d8d"));
}
Assignment
Security functions
Availability
UI