diff --git a/library.json b/library.json index 6a13640..079d9b5 100644 --- a/library.json +++ b/library.json @@ -9,5 +9,5 @@ }, "frameworks": "arduino", "platforms": [ "espressif8266", "espressif32", "atmelsam" ], - "version": "0.3.1" + "version": "0.3.2" } diff --git a/library.properties b/library.properties index eeac561..002e3ec 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=HARestAPI -version=0.3.1 +version=0.3.2 author=debsahu maintainer=debsahu sentence=Home Assistant Rest API diff --git a/src/HARestAPI.cpp b/src/HARestAPI.cpp index d0ef2d5..122a9f0 100644 --- a/src/HARestAPI.cpp +++ b/src/HARestAPI.cpp @@ -99,17 +99,7 @@ String HARestAPI::sendGetHA(String URL) } if ( _fingerprint.length() > 0) { - if (wsclient->verify(_fingerprint.c_str(), _serverip.c_str())) - { - if (_debug) - Serial.println("Certificate matches"); - } - else - { - if (_debug) - Serial.println("Certificate doesn't match"); - _skip_sendurl = true; - } + wsclient->setFingerprint(_fingerprint.c_str()) } if (!_skip_sendurl) { @@ -196,19 +186,9 @@ bool HARestAPI::sendPostHA(String URL, String message) Serial.print("Connecting: "); Serial.println(posturl); } - if ( _fingerprint.length() > 0) + if ( _fingerprint.length() > 0 ) { - if (wsclient->verify(_fingerprint.c_str(), _serverip.c_str())) - { - if (_debug) - Serial.println("Certificate matches"); - } - else - { - if (_debug) - Serial.println("Certificate doesn't match"); - _skip_sendurl = true; - } + wsclient-> setFingerprint(_fingerprint.c_str()) } if (!_skip_sendurl) {