diff --git a/src/GS_Const.h b/src/GS_Const.h index ae748ef..b6a03c9 100644 --- a/src/GS_Const.h +++ b/src/GS_Const.h @@ -305,21 +305,12 @@ struct gauth_token_signer_resources_t MB_String pk; size_t hashSize = 32; // SHA256 size (256 bits or 32 bytes) size_t signatureSize = 256; -#if defined(ESP32) - uint8_t *hash = nullptr; -#elif defined(ESP8266) || defined(MB_ARDUINO_PICO) char *hash = nullptr; -#endif unsigned char *signature = nullptr; MB_String encHeader; MB_String encPayload; MB_String encHeadPayload; MB_String encSignature; -#if defined(ESP32) - mbedtls_pk_context *pk_ctx = nullptr; - mbedtls_entropy_context *entropy_ctx = nullptr; - mbedtls_ctr_drbg_context *ctr_drbg_ctx = nullptr; -#endif gauth_auth_token_info_t tokens; }; diff --git a/src/auth/GAuthManager.cpp b/src/auth/GAuthManager.cpp index f27c6e4..7a27e16 100644 --- a/src/auth/GAuthManager.cpp +++ b/src/auth/GAuthManager.cpp @@ -862,13 +862,13 @@ bool GAuthManager::createJWT() config->signer.tokens.status = token_status_on_signing; // RSA private key - BearSSL::PrivateKey *pk = nullptr; + PrivateKey *pk = nullptr; Utils::idle(); // parse priv key if (config->signer.pk.length() > 0) - pk = new BearSSL::PrivateKey((const char *)config->signer.pk.c_str()); + pk = new PrivateKey((const char *)config->signer.pk.c_str()); else if (strlen_P(config->service_account.data.private_key) > 0) - pk = new BearSSL::PrivateKey((const char *)config->service_account.data.private_key); + pk = new PrivateKey((const char *)config->service_account.data.private_key); if (!pk) {