50 lines
2.3 KiB
C++
50 lines
2.3 KiB
C++
|
#include<SPIFFS.h>
|
||
|
#include<FS.h>
|
||
|
|
||
|
|
||
|
void create_files(){
|
||
|
File serial = SPIFFS.open("/serial.txt",FILE_WRITE);
|
||
|
serial.print("1");
|
||
|
serial.close();
|
||
|
serial = SPIFFS.open("/keyfile.key",FILE_WRITE);
|
||
|
serial.print("-----BEGIN EC PRIVATE KEY-----\n"\
|
||
|
"MIHcAgEBBEIA4THscwU+atnO/MHMqUx65bQl8qipWp3jaoym1C01lHHB1D7o94ed\n"\
|
||
|
"sKo2P0V5lBWvDrvDHvnXF8aoajIE8a502JmgBwYFK4EEACOhgYkDgYYABAFf3u2n\n"\
|
||
|
"+Z2Y7iw3JwfFVjihJDyaLrjjojTgw9JXuZ3mDpC+RbmtvfowO0Pk6NPl8LxeqCf3\n"\
|
||
|
"19rhscMthQQ1NocsBgAWkaAwWhamRW3CBvmgioz9Bh6ETkE7/zJ1USvvoMfXkGqO\n"\
|
||
|
"ZI0MKehIwLGpGkL2JseYKnnNh/Ue5fHzpzfwncpf4g==\n"\
|
||
|
"-----END EC PRIVATE KEY-----\n");
|
||
|
serial.close();
|
||
|
serial = SPIFFS.open("/CA.crt",FILE_WRITE);
|
||
|
serial.print("-----BEGIN CERTIFICATE-----\n"\
|
||
|
"MIICQDCCAZ+gAwIBAgIBATAMBggqhkjOPQQDAgUAMDkxETAPBgNVBAMMCG15c2Vy\n"\
|
||
|
"dmVyMRcwFQYDVQQKDA5teW9yZ2FuaXNhdGlvbjELMAkGA1UEBhMCTkwwHhcNMTkw\n"\
|
||
|
"MTAxMDAwMDAwWhcNMjExMjMxMjM1OTU5WjA5MREwDwYDVQQDDAhteXNlcnZlcjEX\n"\
|
||
|
"MBUGA1UECgwObXlvcmdhbmlzYXRpb24xCzAJBgNVBAYTAk5MMIGbMBAGByqGSM49\n"\
|
||
|
"AgEGBSuBBAAjA4GGAAQBX97tp/mdmO4sNycHxVY4oSQ8mi6446I04MPSV7md5g6Q\n"\
|
||
|
"vkW5rb36MDtD5OjT5fC8Xqgn99fa4bHDLYUENTaHLAYAFpGgMFoWpkVtwgb5oIqM\n"\
|
||
|
"/QYehE5BO/8ydVEr76DH15BqjmSNDCnoSMCxqRpC9ibHmCp5zYf1HuXx86c38J3K\n"\
|
||
|
"X+KjUzBRMA8GA1UdEwQIMAYBAf8CAQAwHQYDVR0OBBYEFPq3svLwKboIsDWdsSyi\n"\
|
||
|
"Ay/Jw3HQMB8GA1UdIwQYMBaAFPq3svLwKboIsDWdsSyiAy/Jw3HQMAwGCCqGSM49\n"\
|
||
|
"BAMCBQADgYwAMIGIAkIB5yPjh42zT9dkWKthaW5Sf7EFs5yQnadfhVnnyqEho2Bt\n"\
|
||
|
"7KkRrI5/+QH0bZ98JeNvtJimAMXXxP2/uSY1pa+es/ACQgG6MbUQOLvxMyIevF5i\n"\
|
||
|
"PkZrwhm8VfpAmwPIU/6xzcpry8wBbCm/vro1oTdQdGdOUlSSlTQ8QFBCqwMxVt9T\n"\
|
||
|
"1RDiwg==\n"\
|
||
|
"-----END CERTIFICATE-----\n");
|
||
|
serial.close();
|
||
|
|
||
|
serial = SPIFFS.open("/cert.req",FILE_WRITE);
|
||
|
serial.print("-----BEGIN CERTIFICATE REQUEST-----\n"\
|
||
|
"MIIBlDCB9AIBADBPMREwDwYDVQQDDAhlc3AzMi5zazEUMBIGA1UECgwLRXhhbXBs\n"\
|
||
|
"ZSBMdGQxJDAiBgNVBAYTG1VLIG91dHB1dF9maWxlPWVzcDMyLnNrLnJlcTCBmzAQ\n"\
|
||
|
"BgcqhkjOPQIBBgUrgQQAIwOBhgAEAV/e7af5nZjuLDcnB8VWOKEkPJouuOOiNODD\n"\
|
||
|
"0le5neYOkL5Fua29+jA7Q+To0+XwvF6oJ/fX2uGxwy2FBDU2hywGABaRoDBaFqZF\n"\
|
||
|
"bcIG+aCKjP0GHoROQTv/MnVRK++gx9eQao5kjQwp6EjAsakaQvYmx5gqec2H9R7l\n"\
|
||
|
"8fOnN/Cdyl/ioAAwDAYIKoZIzj0EAwIFAAOBjAAwgYgCQgHb3sNKKOcUOLIiCIYx\n"\
|
||
|
"wUbyDFUWMOkrZH0sRvKTyyOH+zmP7Z8rJu4pqMoR5N6a3kZ8c+3WTiiOlSb5Hvtd\n"\
|
||
|
"Ttya4gJCAT4HcYqMUBjoz5m0Pv67vIQ/tAhh6+uyX+GjuYhZJNW3NwImhWDWbofW\n"\
|
||
|
"7M4UaISadRE3K9bykB3WoGGeeqI8tI0c\n"\
|
||
|
"-----END CERTIFICATE REQUEST-----\n");
|
||
|
serial.close();
|
||
|
|
||
|
}
|