Error: Trust anchor for certification path not found
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- android, javascript
Rechercherichtung
Beginne mit der webpack-Konfiguration zum Kopieren des Zertifikats und dem Aufruf von https.enableSSLPinning; überprüfe, wie der .cer-Pfad auf Android paketiert wird, und vergleiche ihn mit den dokumentierten Zertifikatanforderungen des Plugins. Reproduziere den GET-Aufruf im Simulator und auf einem physischen Gerät und bestätige anschließend, dass die Anfrage ohne SSLHandshakeException erfolgreich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hello,
Following the documentation I am trying to implement a simple call to test the plugin but I when I execute the call I get the following error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
I am testing it on an Android simulator, but I get the same error on a physical device as well.
Here is my code:
adding the cert to webpack
new CopyWebpackPlugin([
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.jpg" } },
{ from: { glob: "**/*.png" } },
{ from: { glob: "certs/*.cer" } },
]
enable the pinning
const dir = knownFolders.currentApp().getFolder('certs');
const cert = dir.getFile('<cert_name>.cer').path;
https.enableSSLPinning({
host: <domain>',
certificate: cert
});
then
https.request({
url: '<url>',
method: 'GET'
}).then((res) => {
console.log(res.statusCode);
}).catch((err) => {
console.error(err);
});
The code runs without an issue and the certificate is valid. I checked it using the openssl x509 -in <cert.cer> -text -noout command.
Am I missing something?
Thank you
- Vorherrschende Sprache
- Vue
- Sterne
- 52
- Forks
- 40
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nativescript-community/https
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
nativescript-community/https#111 · 4 Kommentare ·
-
iOS StateProvider crash Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
nativescript-community/https#110 · 7 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
nativescript-community/https#109 · 2 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
nativescript-community/https#100 · 3 Kommentare ·
-
Get server certificate? Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
Alle Issues in nativescript-community/https
Ähnliche Issues
-
bug priority:normal ready-for-dev
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
OpenHands/extensions#626 · 1 Kommentar ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
avniproject/avni-client#2135 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
use-agent-os/agent-os#3276 ·