Tag: https

允许Java为SSL / HTTPS连接使用不受信任的证书

我一直在研究一个程序来从dynamicWeb应用程序提取信息,程序工作正常,直到我设置我的Tomcat服务器使用自签名(因此,不可信)的证书使用SSL。 错误的堆栈跟踪是: 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 Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1584) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:877) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089) at […]

SSL – 通用名称(CN)和主题备用名称(SAN)如何协同工作?

假设SSL证书的主题备用名称(SAN)属性包含两个DNS名称 domain.tld host.domain.tld 但通用名称(CN)只能设置为以下两种之一: CN=domain.tld 。 这个设置是否具有特殊的含义,或者在设置两个CN时有什么优势? 如果正在请求另一个host.domain.tld ,服务器端会发生什么? 编辑: 就像最近Eugene的回答所了解到的那样,行为因实现而有所不同,我想要更具体一些: OpenSSL 0.9.8b +如何处理给定的场景?

没有有效的SSL证书,HTTPS连接是否安全?

我使用HTTPS连接而没有有效的SSL证书。 连接安全吗? 信息是否encryption?

asp.net c#从httpredirect到https

所以在我的代码中,我想检测我的login页面是否被称为http,并将其redirect到https。 我知道有没有代码的方式来剥皮这只猫,但令人沮丧的技术reasosn我支持在代码中做它。 if (!Request.IsSecureConnection) { string redirectUrl = Request.Url.ToString().Replace("http:", "https:"); Response.Redirect(redirectUrl); } 所以我把它放在我的Page_Load(…) ,确保我的debugging器使用真正的IIS,而不是VS2008的IIS,并打中debugging。 在debugging器中,华尔兹,命中Response.Redirect(“ https://localhost/StudentPortal3G/AccessControl/AdLogin.aspx ”),命中f5。 获取“互联网Explorere不能显示网页,url是HTTP,而不是HTTPS。没有得到一个信息错误…同样的事情发生没有运行在debugging器。 那么我错过了什么? 它似乎不是火箭科学,我已经看过很多博客上的类似的代码… 我究竟做错了什么? 我认为这应该是一个非常明显的新秀错误,但我没有看到它。

如何在Android上显示来自URL的图片

我想在屏幕上显示图像。 图片应该来自URL,而不是可绘制的。 代码在这里: <ImageView android:id="@+id/ImageView01" android:src = "http://l.yimg.com/a/i/us/we/52/21.gif" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView> 但是在编译时会出错。 如何在Android中显示来自url的图片?

Chrome上的HTTPS页面上的Google Web字体

我正在做一个电子商务项目。 该网站的部分默认为HTTP。 其他(如结帐页面)默认为HTTPS。 在HTTPS页面上,我在Chrome上的控制台上收到此消息: [blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=PT+Sans. [blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700. [blocked] The page at https://store-ws3q9h.mybigcommerce.com/checkout.php?tk=c99fa39e007db6376dcddaac68695c22 ran insecure content from http://fonts.googleapis.com/css?family=Patua+One. 字体以这种方式链接在文档头上: <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Patua+One' rel='stylesheet' type='text/css'> 在目前为止我testing过的其他浏览器上看起来还不错。

使用4096位encryption的SSL证书有什么缺点吗?

我最近通过Godaddy申请SSL证书,并注意到这个消息: screenshot-with-shadow.png http://web.archive.org/web/20150911191355/http://img64.imageshack.us/img64/4526/screenshotwithshadow.png 在过去,我总是生成2048位的CSR请求,但是这一次让我想到也许我应该“加强”,下一步似乎是4096位版本。 在4096位SSL证书上没有太多可用的信息 – 但很显然很多人一直在使用1024位证书,直到他们必须升级,现在一些浏览器不再支持1024位证书。 浏览器如何支持4096位证书? 如果Godaddy需要“至less”2048位证书就够了,还是应该尝试做更多的事情? 如果是的话,有什么优点和缺点? PS:Godaddy消息中的两个链接是“ CSR帮助和了解更多” ,这两个链接我都觉得非常有帮助。

https协议和SSL证书的区别

我们在networking浏览器中使用https协议和SSL证书有什么区别? 这两个都不是用来encryption客户端(浏览器)和服务器之间的通信吗?

Apache 2.4configuration为ssl不能正常工作

Apache服务器2.4与mod_jk 1.3.7不适用于ssl(https) 错误1: 名为Apache的服务报告了以下错误: SSLSessionCache:'shmcb'会话caching不支持(已知名称:)。 也许你需要加载相应的socache模块(mod_socache_shmcb?)。 错误2: 错误应用程序名称:httpd.exe,版本:2.4.4.0,时间戳:0x512fec36错误模块名称:mod_jk.so,版本:1.2.37.0,时间戳:0x4fc48072错误代码:0xc0000005错误偏移量:0x000000000000752d错误进程ID:0x3580错误应用程序启动时间:0x01cee6d2be493d71错误的应用程序path:C:\ Program Files \ Apache Software Foundation \ Apache2.4 \ bin \ httpd.exe错误模块path:C:\ Program Files \ Apache Software Foundation \ Apache2.4 \ modules \ mod_jk。所以报告编号:f8d090fa-52c6-11e3-bce9-e4d53d737212 我们的httpd_ssl.confconfiguration如下: Listen 443 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLPassPhraseDialog builtin SSLSessionCache "shmcb:C:/Program Files/Apache Software Foundation/Apache2.4/logs/ssl_scache(512000)" SSLSessionCacheTimeout 300 <VirtualHost _default_:443> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.4/htdocs" ServerName 127.0.0.1:443 […]

SSLHandshakeException:不存在主题替代名称

我正在通过java代码调用HTTPS SOAP Web服务。 我已经在jre cacerts keystore中导入了自签名证书。 现在我得到: com.sun.xml.internal.ws.com.client.ClientTransportException: HTTP transport error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present 服务URL的主机名与cert中提供的CN的主机名不匹配。 我阅读了一个在这里定义自定义主机名validation者的解决方法。 但我无法在我的代码中实现解决方法。 public SOAPMessage invokeWS(WSBean bean) throws Exception { SOAPMessage response=null; try{ /** Create a service and add at least one port to it. **/ String targetNameSpace = bean.getTargetNameSpace(); String endpointUrl = bean.getEndpointUrl(); QName serviceName = […]