1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-29 05:21:37 +03:00

update example certs (#8642)

* update certs
This commit is contained in:
david gauchard
2022-07-19 12:21:35 +02:00
committed by GitHub
parent a2982f96a4
commit e149829802
6 changed files with 131 additions and 245 deletions

View File

@ -113,7 +113,7 @@ fingerprints will change if anything changes in the certificate chain
the root authorities, etc.).
)EOF");
BearSSL::WiFiClientSecure client;
client.setFingerprint(fingerprint_gitlab_com);
client.setFingerprint(fingerprint_sni_cloudflaressl_com);
fetchURL(&client, gitlab_host, gitlab_port, path);
}
@ -139,7 +139,7 @@ private and not shared. A MITM without the private key would not be
able to establish communications.
)EOF");
BearSSL::WiFiClientSecure client;
BearSSL::PublicKey key(pubkey_gitlab_com);
BearSSL::PublicKey key(pubkey_sni_cloudflaressl_com);
client.setKnownKey(&key);
fetchURL(&client, gitlab_host, gitlab_port, path);
}
@ -155,7 +155,7 @@ BearSSL does verify the notValidBefore/After fields.
)EOF");
BearSSL::WiFiClientSecure client;
BearSSL::X509List cert(cert_USERTrust_RSA_Certification_Authority);
BearSSL::X509List cert(cert_Cloudflare_Inc_ECC_CA_3);
client.setTrustAnchors(&cert);
Serial.printf("Try validating without setting the time (should fail)\n");
fetchURL(&client, gitlab_host, gitlab_port, path);