Skip to content

Commit

Permalink
minor fix and API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketct committed Jun 29, 2020
1 parent 5e913f1 commit b6b3296
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ void setup() {
client.useSignedCertificate("MKRGSM01");
client.usePrivateKey("MKRGSMKEY01");
client.setTrustedRoot("Let_s_Encrypt_Authority_X3");
client.setProfileSSL(1);


Serial.print("Attempting to connect to the MQTT broker: ");
Expand Down
4 changes: 2 additions & 2 deletions src/GSMClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ GSMClient::GSMClient(int socket, bool synch) :
_host(NULL),
_port(0),
_ssl(false),
_sslprofile(0),
_sslprofile(1),
_writeSync(true)
{
MODEM.addUrcHandler(this);
Expand Down Expand Up @@ -444,6 +444,6 @@ void GSMClient::handleUrc(const String& urc)
}
}

void GSMClient::setProfileSSL(uint8_t ssl) {
void GSMClient::setCertificateValidationLevel(uint8_t ssl) {
_sslprofile = ssl;
}
2 changes: 1 addition & 1 deletion src/GSMClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class GSMClient : public Client, public ModemUrcHandler {

/** Set ssl profile
*/
void setProfileSSL(uint8_t ssl);
void setCertificateValidationLevel(uint8_t ssl);

virtual void handleUrc(const String& urc);

Expand Down
2 changes: 1 addition & 1 deletion src/GSMSSLClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void GSMSSLClient::usePrivateKey(const char* name) {

void GSMSSLClient::eraseTrustedRoot() {
for(int i=0; i< _sizeRoot; i++) {
MODEM.sendf("AT+USECPRF=2,0,\"%s\"", _gsmRoots[i].name);
MODEM.sendf("AT+USECMNG=2,0,\"%s\"", _gsmRoots[i].name);
MODEM.waitForResponse(100);
}
}
Expand Down

0 comments on commit b6b3296

Please sign in to comment.