Error: Trust anchor for certification path not found
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- android, javascript
研究方向
從複製憑證的 webpack 設定和 https.enableSSLPinning 呼叫開始;確認 .cer 路徑在 Android 上如何封裝,並與外掛程式文件中記載的憑證要求進行比較。在模擬器和實體裝置上重現 GET,然後確認要求在沒有 SSLHandshakeException 的情況下成功。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Vue
- 星號
- 52
- 分支
- 40
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nativescript-community/https 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
nativescript-community/https#111 · 4 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
nativescript-community/https#110 · 7 則留言 ·
-
難度 3/5 1-2 天 新手友好度 42/100
nativescript-community/https#109 · 2 則留言 ·
-
難度 5/5 一週以上 新手友好度 30/100
nativescript-community/https#100 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
查看 nativescript-community/https 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
connectrpc/connect-py#342 ·
-
01 type: bug
難度 2/5 1-3 小時 新手友好度 84/100
plone/cookieplone-templates#471 ·
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
notch8/utk_knapsack#148 ·
-
helsemelding-json-schema json-schema-core
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 84/100