标签: https

如何使用 SAN 创建 OpenSSL 自签名证书?

从最新的 Chrome 60+ 开始,如果没有 SAN,它会在 HTTPS 页面上抛出 ERROR。OpenSSL 命令行不添加这些扩展。

ssl https command-line openssl ssl-certificate

2
推荐指数
1
解决办法
1万
查看次数

如何为camel-https4配置trustStore

我已经这样声明了我的路线(从http://camel.apache.org/http4.html 获取想法):

@Component
public class MyRouteDefinition extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        KeyStoreParameters ksp = new KeyStoreParameters();
        ksp.setType("pkcs12");
        ksp.setResource(PushRoutesDefinition.class.getResource("/keystore.p12").getPath());
        ksp.setPassword("password");

        KeyManagersParameters kmp = new KeyManagersParameters();
        kmp.setKeyStore(ksp);
        kmp.setKeyPassword("password");

        SSLContextParameters scp = new SSLContextParameters();
        scp.setKeyManagers(kmp);

        HttpComponent httpComponent = getContext().getComponent("https4", HttpComponent.class);
        httpComponent.setSslContextParameters(scp);

        //TO HTTPS
        from(...)
        .to("https4://localhost:8080/load")
        .process(exchange -> {
                    Integer responseCode = 
             exchange.getIn().getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class);
             log.debug("The response code is: {}", responseCode);
         }
    }
Run Code Online (Sandbox Code Playgroud)

但我看到错误:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to …
Run Code Online (Sandbox Code Playgroud)

java ssl https apache-camel spring-camel

2
推荐指数
1
解决办法
2346
查看次数

Spring RestTemplate 接收 sun.security.validator.ValidatorException:PKIX 路径构建失败:

我正在尝试连接到通过 HTTPS 的第三方 URL。他们告诉我们,我们只需要向他们发送 HTTPS POST(不需要证书/密钥库)。但是,我收到以下异常:

org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://mep.moxtra.com/sample/api/v1/auth/cus/token": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) …
Run Code Online (Sandbox Code Playgroud)

java https spring resttemplate

2
推荐指数
1
解决办法
8164
查看次数

如何在应用浏览器中构建在微信中运行的 Web 应用程序?

我正在尝试构建一个简单的 Web 应用程序,它捕获用户照片并通过连接到其他一些业务用例将其发送到我的自定义服务器那里。我的网页使用 HTML 的文件输入控件来启动本机相机或图库选择选项。

var input = document.createElement('input');
    input.setAttribute('accept', 'image/*');
    input.setAttribute('capture', 'camera');
    input.setAttribute('type', 'file');
    input.click();
Run Code Online (Sandbox Code Playgroud)

这个网络应用程序,我放置在名为“PhotoLocker”的本地网络服务器中,并使用 url 进行测试

https://localhost(ipaddress to access via mobile browser)/PhotoLocker/index.html
Run Code Online (Sandbox Code Playgroud)

此链接在桌面和移动 chrome 浏览器上都可以正常工作,并且能够调试任何问题。同样的链接,我尝试从微信浏览器访问(只是从聊天窗口打开上面的链接),它根本没有在应用程序浏览器中打开我在微信中的应用程序。

google了一下,发现https URL scheme微信不支持。是真的吗?当我粘贴与 相同的应用程序 url 时weixin://ipaddress/PhotoLocker/index.html,我可以看到我的网络应用程序主页,但它没有按预期工作。

我的问题是 - 如何调试我在微信浏览器中打开的网页?开发和测试示例应用程序是否需要官方微信开发帐户? 附加信息: 我可以使用以下链接中提到的微信 web devloper 工具调试网页。但是,无法在此工具中调试移动微信页面。它总是打开 chrome 开发工具。 https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140&t=0.06697335132505233#1

https google-chrome-extension google-chrome-devtools wechat weixinjsbridge

2
推荐指数
1
解决办法
3350
查看次数

如何将opencart站点http移动到https

我已经在我的 opencart 站点上安装了 ssl 证书,但有些页面在 https 上工作正常,但类别页面在 https 上不工作。我还需要更改数据库中的所有 url 吗?在配置文件中,我已经设置了 https。

ssl https opencart

2
推荐指数
1
解决办法
2432
查看次数

无法在 Istio 网关中设置 https

使用 http 设置 Istio 网关很好。

但是我无法设置https。我按照指南https://istio.io/docs/tasks/traffic-management/secure-ingress/

Istio:1.0.2(使用 Helm 安装)Kubernetes 1.10.3 eks

我正在使用 COMODO 的证书。

只有第一次,我才能使用 https 访问该页面。访问页面后,如果我再次尝试连接,我会在浏览器中收到以下错误。

mycompany.com unexpectedly closed the connection.
Try:

Checking the connection
Checking the proxy and the firewall
Run Code Online (Sandbox Code Playgroud)

如果我使用 curl,我会收到以下错误。

curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to qa-web.ffau.to:443
Run Code Online (Sandbox Code Playgroud)

如果我正在使用 openssl 进行测试,

openssl s_client -tls1 -connect mycompany.com:443 -msg

错误

140735917949896:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.2/libressl/ssl/s3_pkt.c:522:
Run Code Online (Sandbox Code Playgroud)

这就是我创造秘密的方式。

kubectl create -n istio-system secret tls istio-ingressgateway-certs --key ffau.to.key  --cert ffau.to.crt 
Run Code Online (Sandbox Code Playgroud)

这是网关和虚拟服务的yaml。

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: mycompany-gateway
spec:
  selector: …
Run Code Online (Sandbox Code Playgroud)

https gateway istio

2
推荐指数
1
解决办法
2669
查看次数

2
推荐指数
1
解决办法
2006
查看次数

带有 IP 地址的 Google 托管证书

我正在尝试为我的计算引擎实例创建 Google 托管 SSL 证书。但是,我需要输入域。问题是,我没有与我的实例关联的域,我只有它的外部 IP 地址。

如何将我的实例的 IP 地址用于证书,或者如何将其与域相关联?

ssl https load-balancing ssl-certificate google-compute-engine

2
推荐指数
1
解决办法
1737
查看次数

如果方案在 kubernetes 中设置为 HTTPS,Liveness 探针是否验证证书?

kubernetes 中的活性探针是否验证 https 请求的证书?我正在为我的项目使用自签名证书。

https probe kubernetes

2
推荐指数
1
解决办法
2776
查看次数

在 Java 中禁用 SSL 证书验证

如何在 Java 8 中禁用证书验证。我正在尝试使用 https 连接到其他服务器,但我不断收到此错误:

Exception while providing content: [Thread[RMI TCP Connection(8)-192.168.56.1,5,RMI Runtime], 1549283885696] de.innovas.iaf.base_common.exceptions.NonRecoverableException: CT_0001_0[javax.xml.ws.soap.SOAPFaultException: Marshalling Error: com.sun.istack.SAXException2: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
[Thread[RMI TCP Connection(8)-192.168.56.1,5,RMI Runtime], 1549283885696] de.innovas.iaf.base_common.exceptions.NonRecoverableException: CT_0001_0[javax.xml.ws.soap.SOAPFaultException: Marshalling Error: com.sun.istack.SAXException2: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path …
Run Code Online (Sandbox Code Playgroud)

java ssl https

2
推荐指数
1
解决办法
3万
查看次数