- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我在有 MITM SSL 交换防火墙的网络(google.com 不是由 Google 发布,而是由自定义 CA 根权限重新发布)这里有更多详细信息 https://security.stackexchange.com/questions/107542/is-it-common-practice-for-companies-to-mitm-https-traffic .
我有简单的 Dockerfile:
FROM alpine:latest
RUN apk --no-cache add curl
它因 SSL 错误而严重失败
=> ERROR [2/2] RUN apk --no-cache add curl 1.0s
------
> [2/2] RUN apk --no-cache add curl:
#5 0.265 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
#5 0.647 140037857143624:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:
#5 0.649 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: Permission denied
#5 0.649 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
#5 0.938 140037857143624:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:
#5 0.940 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: Permission denied
#5 0.941 ERROR: unable to select packages:
#5 0.942 curl (no such package):
#5 0.942 required by: world[curl]
------
executor failed running [/bin/sh -c apk --no-cache add curl]: exit code: 1
Internet 上的每个教程都说我可以添加自己的“受信任”根证书并运行
update-ca-certificates
.
FROM alpine:latest
USER root
RUN apk --no-cache add ca-certificates \
&& update-ca-certificates
错误类似
=> ERROR [2/2] RUN apk --no-cache add ca-certificates && update-ca-certificates 1.0s
------
> [2/2] RUN apk --no-cache add ca-certificates && update-ca-certificates:
#5 0.269 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
#5 0.662 140490932583240:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:
#5 0.663 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
#5 0.663 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: Permission denied
#5 0.929 140490932583240:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913:
#5 0.931 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: Permission denied
#5 0.932 ERROR: unable to select packages:
#5 0.933 ca-certificates (no such package):
#5 0.933 required by: world[ca-certificates]
------
executor failed running [/bin/sh -c apk --no-cache add ca-certificates && update-ca-certificates]: exit code: 1
是否有其他解决方案如何安装
update-ca-certificates
工具?还是我错过了什么?
update-ca-certificates
commnad)
FROM alpine:latest
USER root
# To be able to download `ca-certificates` with `apk add` command
COPY my-root-ca.crt /root/my-root-ca.crt
RUN cat /root/my-root-ca.crt >> /etc/ssl/certs/ca-certificates.crt
# Add again root CA with `update-ca-certificates` tool
RUN apk --no-cache add ca-certificates \
&& rm -rf /var/cache/apk/*
COPY my-root-ca.crt /usr/local/share/ca-certificates
RUN update-ca-certificates
RUN apk --no-cache add curl
编辑:我想到的一种解决方案是将 curl docker 图像与
-k
一起使用选项和下载
.apk
使用这些证书和工具。将其安装为本地文件。添加我的根 CA 证书并运行
update-ca-certificates
.听起来 super 疯狂,所以我认为这必须是更好的解决方案:)
最佳答案
将您的自签名证书附加到 /etc/ssl/certs/ca-certificates.crt
手动。
假设您在构建目录中名为 my-cert.pem
的文件中拥有自签名证书。 :
FROM alpine:latest
COPY my-cert.pem /usr/local/share/ca-certificates/my-cert.crt
RUN cat /usr/local/share/ca-certificates/my-cert.crt >> /etc/ssl/certs/ca-certificates.crt && \
apk --no-cache add \
curl
注:当您使用
update-ca-certificates
,您需要将您的证书文件放入
/usr/local/share/ca-certificates/
第一的。
关于docker - 如何将受信任的根 CA 添加到 Docker alpine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67231714/
从今天早上开始,我的证书在 Android 上不再受信任,然后我的应用程序无法再连接: Catch exception while startHandshake: javax.net.ssl.SSL
我想知道是否有人有解决方案允许从usize类型(从访问数组索引或获取矢量长度中获得)的隐式转换为i32?可能吗? 当然,我假设矢量长度和数组范围在i32限制之内。 最佳答案 您可以在函数参数中使用 T
我用 mitmproxy从离开我们网络的出站 AS2 (HTTP) 请求中收集情报。架构是这样的: Mendelson AS2 ➡ mitmproxy ➡ partner AS2 server
我有几个实例,我的 Javascript 代码似乎在泄漏内存,但我不确定我应该从垃圾收集器那里得到什么。 例如 var = new Object() 在 Firefox 中运行的间隔计时器函数似乎会随
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwa
我想我在这里没有想法。 我正在尝试使用具有 ssl 证书的 java 中的 Web 服务。 我创建了一个 keystore 文件,并在其中添加了证书。该文件位于我的项目文件夹中。 我使用以下方式导入它
我在/etc/pki/ca-trust/source/anchors 中添加了一个 crt,这样服务器证书就可以被 ssl 客户端信任。所以,例如,当我 curl https://证书自动受信任。 有
我搜索了很多帖子,但找不到任何解决方案或问题的答案。如何从安装了中间证书的站点下载文件?使用 DownloadManager 时,出现错误“java.security.cert.CertPathVal
我无法使用 SSL: 我从服务器下载了证书,它运行良好。 我还使用本文中的代码将 myCertificate.cert 添加到我的 iPhone 钥匙串(keychain)线程:Importing a
首先,我知道信任所有证书可能存在的风险,但是出于某些测试目的,我必须实现这一点。 如何强制我的客户信任所有证书?我正在使用 javax.websocket 来实现 我所做的只是像连接到 ws 一样 W
信任 $_SERVER['REMOTE_ADDR'] 是否安全?可以通过更改请求的 header 或类似的东西来代替吗? 这样写安全吗? if ($_SERVER['REMOTE_ADDR'] ==
我有一个产品由内部 ASP.NET/MVC 网站组成,所有网站都使用 WIF 通过自定义 STS/IdP 服务启用 SSO。我们现在有一个新的合作伙伴站点托管在我们网络之外的另一个域上,并且希望在用户
我在我开始构建的 Rails 应用程序上使用 sendgrid。我处于测试模式,主要做本地工作,但我发送了很多电子邮件来检查我的流程或电子邮件布局。 我用来接收电子邮件的电子邮件是在 Gmail 上。
我一直在研究我得到的原因: java.util.concurrent.ExecutionException: javax.net.ssl.SSLException: Received fatal al
我有 SVN 服务器通过 HTTPS 在 Apache 下运行 这是我的服务器端配置,“/etc/httpd/conf.d/subversion.conf”: SSLRequireSSL S
我有一个用于开发测试的自签名证书。我已将它添加到证书管理器中的“受信任的根证书颁发机构”文件夹下,当在 IE 或 Chrome 下访问该站点时,它被认为是有效的(在 Firefox 下它不喜欢它是自签
我遇到了 android 4 设备的问题,这些设备在连接到服务器时收到以下异常: java.security.cert.CertPathValidatorException: Trust anchor
我是一个安卓新手。这个问题已经被问过很多次了,但我已经解决了这里几乎所有的问题。 我正在尝试在 Node.Js 服务器(使用 express)和 Android 上的 Volley 上使用自签名证书。
我想使用 WebClient 从安全服务器检索 JSON 文件,但我的 Windows Phone 8 不允许我这样做,因为如果 WebCLient 不信任 SSL 证书,它会抛出异常。 问题在于它不
我正在编写服务器以支持适用于 iOS 和 Android 的基于位置的应用程序。该应用程序要求我们验证用户的身份及其位置。我知道如何做前者,但不知道后者。 是否可以验证客户端发送给我的纬度/经度实际上
我是一名优秀的程序员,十分优秀!