标签: https

htaccess重定向非www和http和https

我想:

  • http://example.com 重定向到: http://www.example.com
  • https://example.com 重定向到: https://www.example.com

任何http://whatever.example.com不附加www的东西http://www.whatever.example.com.

.htaccess https redirect http

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

客户端身份验证方案"Anonymous"禁止HTTP请求

我正在尝试配置WCF服务器\客户端以使用SSL

我得到以下异常:

客户端身份验证方案"Anonymous"禁止HTTP请求

我有一个自托管的WCF服务器.我运行hhtpcfg我的客户端和服务器证书都存储在本地计算机上的个人和受信任人员下

这是服务器代码:

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
binding.Security.Mode = WebHttpSecurityMode.Transport;
_host.Credentials.ClientCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.PeerOrChainTrust;
_host.Credentials.ClientCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
_host.Credentials.ClientCertificate.Authentication.TrustedStoreLocation = StoreLocation.LocalMachine;
_host.Credentials.ServiceCertificate.SetCertificate("cn=ServerSide", StoreLocation.LocalMachine, StoreName.My);
Run Code Online (Sandbox Code Playgroud)

客户代码:

binding.Security.Mode = WebHttpSecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; 
WebChannelFactory<ITestClientForServer> cf =
                new WebChannelFactory<ITestClientForServer>(binding, url2Bind);
cf.Credentials.ClientCertificate.SetCertificate("cn=ClientSide", StoreLocation.LocalMachine, StoreName.My);
            ServicePointManager.ServerCertificateValidationCallback
                   += RemoteCertificateValidate;
Run Code Online (Sandbox Code Playgroud)

查看web_tracelog.svclog和trace.log显示服务器无法验证客户端证书我的证书未由授权CA签名,但这就是我将它们添加到可信人员的原因....

我错过了什么?我错过了什么?

security https wcf certificate

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

Node.js HTTPS安全错误

我正在尝试创建一个安全的node.js服务器,以便与使用ssl(https)的网站一起使用.

const crypto = require('crypto'),
      fs = require("fs"),
      http = require("http");

var privateKey = fs.readFileSync('/home/privatekey.pem');
var certificate = fs.readFileSync('/home/certificate.pem');

var credentials = crypto.createCredentials({key: privateKey.toString(), cert: certificate.toString()});

var handler = function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
};

var server = http.createServer();
server.setSecure(credentials);
server.addListener("request", handler);
server.listen(8084);
Run Code Online (Sandbox Code Playgroud)

但是,当我启动我的服务器时,我收到以下错误:

node.js:116
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: Object #<Server> has no method 'setSecure'
    at Object.<anonymous> (/home/meshdev/public_html/js/node/server/test.js:16:8)
    at Module._compile (module.js:380:26)
    at Object..js (module.js:386:10)
    at Module.load (module.js:312:31) …
Run Code Online (Sandbox Code Playgroud)

https node.js socket.io

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

来自不同域的SSL iframe和SSL页面

现在为所有这些选项设置沙箱是不可行的.所以我呼吁社区寻求帮助.这是一个奇怪的,我只想知道什么会起作用(最重要的是在ie)和什么不会.

  1. 包含来自同一域的https的iframe的Http页面//不知道
  2. 包含来自不同域的https的iframe的Http页面//不知道
  3. 包含来自同一域的https的iframe的Https页面//不知道
  4. 使用包含来自其他域的https的iframe的Https页面//不知道
  5. 包含来自同一域的http的iframe的Http页面//我知道这有效
  6. 包含来自不同域的http的iframe的Http页面//我知道这有效
  7. 包含来自同一域的http的iframe的Https页面//怀疑这是否有效
  8. 包含来自不同域的http的iframe的Https页面//怀疑这是否有效

为了更好的阅读;)

??????????????????????????????????????????????????????????????????????????????????
? Page with an iFrame ? c ? inside iFrame ?      domain      ?       works?      ?
??????????????????????? o ????????????????????????????????????????????????????????
?   http   ?   https  ? n ?  http ? https ? same ? different ?                   ?
??????????????????????? t ????????????????????????????????????????????????????????
?     X    ?          ? a ?       ?   X   ?   X  ?           ?      no idea      ?
??????????????????????? i ????????????????????????????????????????????????????????
?     X    ?          ? n ?       ?   X   ?      ?     X     ?      no idea …
Run Code Online (Sandbox Code Playgroud)

ssl https iframe widget

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

Arduino上的HTTPS替代品

我正在考虑在我正在进行的项目中使用Arduino,但问题仍然存在.

Arduino将收集数据,偶尔会将它们发送到服务器.我希望能够保证数据传输.

我知道Arduino没有足够的处理能力来处理HTTPS加密,但我想知道是否可以在这里使用一个可靠的替代品.

你怎么看?

encryption https arduino

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

443端口中的多个域位于同一IP中

我在IIS 7的端口443(https)中托管了一个网站"www.example1.com".现在我为同一个IP购买了一个新的"www.example2.com"域名.我想在443端口(我已经使用443端口用于"www.example1.com")托管该域(www.example2.com)中的另一个网站.

我怎样才能做到这一点?这是否可以在同一IP的端口443中托管两个域?如果有人可以,请让我知道正确的方法吗?我正在使用IIS 7.

此致,Karthik

https iis-7 multiple-domains

15
推荐指数
4
解决办法
4万
查看次数

Jersey客户端HTTPS性能问题

我正在使用JUnit测试JERSEY Client + HTTPS来测试secure web service运行Jetty.我的一个呼叫是wr.get( ClientResponse.class)在每个块之后挂起10秒钟9-10 requests.等效Apache client代码在几毫秒内运行.如果我切换Jetty to HTTP模式,问题就会消失.

我在用 Jersey bundle & client 1.14 and Jetty 6.1.26



apache客户端工作

@Test
public void testApacheClient() throws Exception
{
  HttpClient client = new HttpClient();
  ProtocolSocketFactory socketFactory = new EasySSLProtocolSocketFactory();
  Protocol https = new Protocol( "https", socketFactory, 443 );
  Protocol.registerProtocol( "https", https );

  //Finishes in < 1 second
  for ( int i = 0; i < …
Run Code Online (Sandbox Code Playgroud)

java https jersey

15
推荐指数
1
解决办法
3227
查看次数

Node.js中的Kerberos身份验证https.get或https.request

我正在尝试编写一个简单的脚本,从内部网络上的工具请求一些数据.这是代码:

#!/usr/bin/node

var https = require('https');
var fs = require('fs');

var options = {
  host: '<link>',
  port: 443,
  path: '<path>',
  auth: 'username:password',
  ca: [fs.readFileSync('../.cert/newca.crt')]
};

https.get(options, function(res) {
  console.log("Got response: " + res.statusCode);
  res.on('data', function (d) {
    console.log('BODY: ' + d);
  });
}).on('error', function(e) {
  console.log("Got error: " + e.message);
});
Run Code Online (Sandbox Code Playgroud)

现在的问题是,如何使用Kerberos票证进行身份验证,而不是以auth:纯文本形式提供我的凭据?

javascript https kerberos node.js

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

如何使用iOS 7的NSURLSession接受自签名SSL证书

我有以下代码(快速实现):

func connection(connection: NSURLConnection, canAuthenticateAgainstProtectionSpace protectionSpace: NSURLProtectionSpace) -> Bool
{
    return protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust
}

func connection(connection: NSURLConnection, didReceiveAuthenticationChallenge challenge: NSURLAuthenticationChallenge)
{
    if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust
    {

        if challenge.protectionSpace.host == "myDomain"
        {
            let credentials = NSURLCredential(forTrust: challenge.protectionSpace.serverTrust)
            challenge.sender.useCredential(credentials, forAuthenticationChallenge: challenge)
        }
    }

    challenge.sender.continueWithoutCredentialForAuthenticationChallenge(challenge)

}
Run Code Online (Sandbox Code Playgroud)

它在iOS 8.x中完美运行,但 在iOS 7.x中不起作用在iOS 7.x中我有错误:

NSURLConnection/CFURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9813)

任何的想法?谢谢!!!

ssl https self-signed ios swift

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

为什么说HTTP2是二进制协议?

我刚刚阅读了一篇关于http1和http2之间差异的文章,但我的主要问题是当它说http2 是二进制协议而http1 是文本协议时。

也许我错了,但我知道任何数据是文本或任何格式,它可以在内存中具有二进制表示形式,即使通过 TCP/IP 网络传输时,数据也会按照层(OSI 模型)的格式进行拆分或 TCP/IP 模型表示),这意味着在通过网络传输数据的上下文中不存在技术上的文本格式。

所以我不能真正理解 http2 和 http1 之间的这种不同,你能帮我更好的解释吗?

https http http-1.1 web-development-server http2

15
推荐指数
2
解决办法
3782
查看次数