@@ -243,7 +243,7 @@ bool pointperfectProvisionDevice()
243
243
char versionString[9 ];
244
244
getFirmwareVersion (versionString, sizeof (versionString), false );
245
245
246
- StaticJsonDocument< 256 > pointPerfectAPIPost;
246
+ JsonDocument pointPerfectAPIPost;
247
247
248
248
char tokenString[37 ] = " \0 " ;
249
249
char tokenChar;
@@ -443,10 +443,10 @@ void pointperfectGetToken(char *tokenString)
443
443
// Given a prepared JSON blob, pass to the PointPerfect API
444
444
// If it passes, keys/values are recorded to settings, ZTP_SUCCESS is returned
445
445
// If we fail, a ZTP response is returned
446
- ZtpResponse pointperfectTryZtpToken (StaticJsonDocument< 256 > &apiPost)
446
+ ZtpResponse pointperfectTryZtpToken (JsonDocument &apiPost)
447
447
{
448
448
#ifdef COMPILE_WIFI
449
- DynamicJsonDocument *jsonZtp = nullptr ;
449
+ JsonDocument *jsonZtp = nullptr ;
450
450
char *tempHolderPtr = nullptr ;
451
451
452
452
WiFiClientSecure client;
@@ -526,7 +526,7 @@ ZtpResponse pointperfectTryZtpToken(StaticJsonDocument<256> &apiPost)
526
526
{
527
527
// Device is now active with ThingStream
528
528
// Pull pertinent values from response
529
- jsonZtp = new DynamicJsonDocument ( 8192 ) ;
529
+ jsonZtp = new JsonDocument ;
530
530
if (!jsonZtp)
531
531
{
532
532
systemPrintln (" ERROR - Failed to allocate jsonZtp!\r\n " );
@@ -645,7 +645,7 @@ ZtpResponse pointperfectTryZtpToken(StaticJsonDocument<256> &apiPost)
645
645
}
646
646
647
647
// Find thing3 in (*jsonZtp)[thing1][n][thing2]. Return n on success. Return -1 on error / not found.
648
- int findZtpJSONEntry (const char *thing1, const char *thing2, const char *thing3, DynamicJsonDocument *jsonZtp)
648
+ int findZtpJSONEntry (const char *thing1, const char *thing2, const char *thing3, JsonDocument *jsonZtp)
649
649
{
650
650
if (!jsonZtp)
651
651
return (-1 );
@@ -784,7 +784,7 @@ bool checkPrivateKeyValidity(char *privateKey, int privateKeySize)
784
784
int result_code = mbedtls_pk_parse_key (&pk, (unsigned char *)privateKey, privateKeySize + 1 , nullptr , 0 , mbedtls_ctr_drbg_random, &ctr_drbg);
785
785
mbedtls_pk_free (&pk);
786
786
mbedtls_ctr_drbg_free (&ctr_drbg);
787
-
787
+
788
788
if (result_code < 0 )
789
789
{
790
790
if (settings.debugPpCertificate )
0 commit comments