NetBurner 3.5.0
PDF Version |
|
This example shows how to enable auto-generation of self-signed certificates. The certificate will enable secure communication to the system configuration web server and the HTTPS web server of the application. On-board generation of certificates are an alternative to creating your own self-signed certificates and uploading them to your NetBurner device. This simple example should cover most use cases. Please refer to the other examples for additional functionality.
Auto-generated certificates will operate as follows:
EnableOnboardCertificateCreation()
enables certificate generation.ENABLE_AUTOCERT_REGEN
is defined in predef.h, the certificate will update when it expires, creating a new 1 year certificate. Generation will occur on next SSL/TLS access.ENABLE_AUTO_CERT_REGEN
is defined in predef.h, AUTO_CERT_GEN_CHECK will dictate how frequently a certificate is checked for expiration. The default value is one minute.If the system time is incorrect, the certificate will be invalid.
Additional Examples:
Examples of a HTTPS server with a compiled-in certificate:
<NNDK install>\examples\ssl\sslserver
<NNDK install>\examples\ssl\SslWebDemo
Examples of uploading a certificate/key pair manually:
<NNDK install>\examples\ssl\HttpsDualCert
<NNDK install>\examples\ssl\HttpsUploadCert