Error: Trust anchor for certification path not found
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- android, javascript
Piste de recherche
Commencez par la configuration webpack de copie du certificat et l'appel à https.enableSSLPinning ; vérifiez comment le chemin .cer est empaqueté sur Android et comparez-le aux attentes documentées du plugin concernant le certificat. Reproduisez le GET dans le simulateur et sur un appareil physique, puis confirmez que la requête aboutit sans SSLHandshakeException.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Vue
- Étoiles
- 52
- Forks
- 40
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nativescript-community/https
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
nativescript-community/https#111 · 4 commentaires ·
-
iOS StateProvider crash Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
nativescript-community/https#110 · 7 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 42/100
nativescript-community/https#109 · 2 commentaires ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
nativescript-community/https#100 · 3 commentaires ·
-
Get server certificate? Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
Toutes les issues de nativescript-community/https
Issues similaires
-
bug priority:normal ready-for-dev
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
OpenHands/extensions#626 · 1 commentaire ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
avniproject/avni-client#2135 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
use-agent-os/agent-os#3276 ·