LOGGER
Logger
Data Logging using ESP8266
|
Security services. More...
#include <arduino.h>
#include <SD.h>
#include "security.h"
#include "parameters.h"
#include "webservices.h"
Macros | |
#define | securityEdit 2 |
version of this module | |
#define | DELETE_READ_NAME ((char *)"clearreadsignature.dat") |
file that triggers read signature clearing More... | |
#define | DELETE_WRITE_NAME ((char *)"clearwritesignature.dat") |
file that triggers write signature clearing | |
Functions | |
EXTERNDEF void | securityInit () |
EXTERNDEF bool | securityReadAllowed () |
EXTERNDEF bool | securityReadWriteAllowed () |
EXTERNDEF void | securityConfigurationPage () |
display the security configuration page | |
Variables | |
EXTERNVAR char | readSignature [32] |
< version of this include file More... | |
EXTERNVAR char | readWriteSignature [32] |
Security services.
#define DELETE_READ_NAME ((char *)"clearreadsignature.dat") |
file that triggers read signature clearing
$$$Passing a string constant to the SD.exists subroutine gives a deprecated warning about converting a string constant to (char *). The explicit conversion here hides the warning. There may be issues on some platforms with passing a pointer to constant data to routines that expect pointers to the (char *) type.
EXTERNDEF void securityInit | ( | ) |
Call once at system startup. This routine will determine if the signatures should be cleared. The flash file system must be initialize and ready to operate prior to calling this routine.
EXTERNDEF bool securityReadAllowed | ( | ) |
Test if reading is allowed. If reading is not allowed emit an error page and terminate the page with a call to webEndPage. (Assumes that the page was started with webStartPage).
NOTE: if the signature matches the write signature reads are allowed.
EXTERNDEF bool securityReadWriteAllowed | ( | ) |
Test if both reading and writing are allowed. If not allowed emit an error page and terminate the page with a call to webEndPage. (Assumes that the page was started with webStartPage).
NOTE: if the write signature is empty and the read signature is not the read signature must match to allow this page to display.
EXTERNVAR char readSignature[32] |
< version of this include file
Stored signature for pages that require read access. This symbol is exposed to allow the parameters module to have access. It should not be used by others.
EXTERNVAR char readWriteSignature[32] |
Stored signature for pages that require read/write access. This symbol is exposed to allow the parameters module to have access. It should not be used by others.