标签: https

Stripe - PHP错误 - Stripe不再支持使用TLS 1.0发出的API请求

是否可以在没有HTTPS页面的情况下运行条带测试?我似乎在我的localhost上收到以下错误.有没有办法纠正它?

这在提交付款信息后发生.

致命错误:未捕获异常'Stripe\Error\Authentication',消息'Stripe不再支持使用TLS 1.0发出的API请求.请使用TLS 1.2或更高版本启动HTTPS连接.您可以访问https://stripe.com/blog/upgrading-tls了解有关此内容的更多信息.在/Applications/MAMP/htdocs/composer/vendor/stripe/stripe-php/lib/ApiRequestor.php:110来自API请求'req_9AwHIpLsRiWhRz'堆栈跟踪:#0/Applications/MAMP/htdocs/composer/vendor/stripe/stripe -php/lib/ApiRequestor.php(227):Stripe\ApiRequestor-> handleApiError('{\ ​​n"error":{\n ...',401,Array,Array)#1/Applications/MAMP/htdocs/composer/vendor/stripe/stripe-php/lib/ApiRequestor.php(65):Stripe\ApiRequestor - > _ interpretResponse('{\ ​​n"error":{\n ...',401,Array)#2/Applications /MAMP/htdocs/composer/vendor/stripe/stripe-php/lib/ApiResource.php(120):Stripe\ApiRequestor-> request('post','/ v1/customers',Array,Array)#3/Applications /MAMP/htdocs/composer/vendor/stripe/stripe-php/lib/ApiResource.php(160):Stripe\ApiResource :: _ staticRequest('post','/ v1/custom in/Applications/MAMP/htdocs/composer /第110行的vendor/stripe/stripe-php/lib/ApiRequestor.php

php ssl https stripe-payments

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

Boost.Asio SSL上下文未验证证书

这是我之前的问题的延续,Boost.Asio SSL上下文load_verify_paths没有加载证书.

我有一个从Windows上的系统CA存储生成的CA文件.任何无效/过期的证书都不包含在生成的文件中.

我的Boost Asio代码不想使用此CA存储进行验证.文件加载得很好,ssl::context::load_verify_file返回没有错误,但验证回调一直被preverified设置为调用false.

以下是使用证书文件运行openssl的示例:

Loading 'screen' into random state - done
CONNECTED(00000178)
depth=3 /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
verify return:1
depth=2 /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA
Certification Authority
verify return:1
depth=1 /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA
Domain Validation Secure Server CA
verify return:1
depth=0 /OU=Domain Control Validated/OU=PositiveSSL/CN=example.org
verify return:1
---
Certificate chain
 0 s:/OU=Domain Control Validated/OU=PositiveSSL/CN=example.org
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
 1 …
Run Code Online (Sandbox Code Playgroud)

c++ https boost openssl ssl-certificate

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

iOS HTTPS SSL证书

场景我正在研究一个需要利用https网络通信的应用程序.目前,我们的用户凭据(用户名,密码...)通过我们的URL以纯文本形式发送.(例如http://www.myserver.com/service?username=USERNAME&password=PASSWORD...).这对我们的客户不利.我是新手https,甚至更新用于设置iOS应用程序https.所以我有几个问题:

假设:我认为iOS应用必须包含SSL证书才能在服务器端验证.如我错了请纠正我.

1)在哪里/如何获得证书?

2)如何导入证书到应用程序?

3)如何使用服务器验证证书?

4)如果证书被认为无效,我该如何解决?

如果有什么我遗失或误解,请纠正我.

ssl https certificate ios

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

如何让request.route_url使用金字塔吐出https链接而不是http?

我在pyramid框架上有一个应用程序,我request.route_url随处可见.我刚刚将我的应用程序切换到HTTPS,并且所有链接仍然以HTTP形式出现.

是否有一个全局设置我可以放在某个配置文件中,这将改变我的整个应用程序,或者我可以传递给这个函数的参数,它将给我一个HTTPS URL或最好是//不可知的URL( //)?

python https pyramid

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

如何通过SslStream和TcpClient将有效的HTTPS请求发送到Web服务

我实质上是在尝试设置一个HTTPS客户端,该客户端可用于我正在开发的自动化测试API和其他Web服务。我对使用套接字很熟悉,但是对在代码中使用SSL / TLS却不太了解。我首先尝试设置一个客户端,该客户端使用以下标头向google.com发送HTTP请求:GET / HTTP/1.1

这个想法是通过加密连接从Google接收基本的HTTP响应。使用未加密的HTTP时,这真的很容易-我什至可以通过端口80 telnet到google中,然后输入GET / HTTP/1.1,我会收到一个不错的HTTP响应标头和HTML有效负载。实现C / C#代码以发出未加密的HTTP请求也不是很困难。SSL使我很难受。

使用下面的代码(可在https://msdn.microsoft.com/zh-cn/library/system.net.security.sslstream.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet中找到完整的示例-3),与MSDN提供的参考几乎完全相同,我可以成功连接google.com并验证服务器证书:

        // Create a TCP/IP client socket.
        // machineName is the host running the server application.
        TcpClient client = new TcpClient(machineName, 443);
        Console.WriteLine("Client connected.");
        // Create an SSL stream that will close the client's stream.
        SslStream sslStream = new SslStream(
            client.GetStream(),
            false,
            new RemoteCertificateValidationCallback(ValidateServerCertificate),
            null
            );
        // The server name must match the name on the server certificate.
        try
        { …
Run Code Online (Sandbox Code Playgroud)

c# sockets asp.net ssl https

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

C++套接字连接中的OpenSSL(HTTPS客户端)

我写了一个脚本,可以创建与HTTP服务器的连接,并在控制台中显示网站的内容.很容易.

但我想连接到https服务器并执行相同的过程.我在谷歌搜索,没有找到我搜索的内容.

请帮帮我,给我一个教程,我可以使用openssl库.

我在openssl库上尝试过自己,但是库非常复杂且难以理解.

这是我的http客户端代码:

#include <iostream>
#include <ctype.h>
#include <cstring>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sstream>
#include <fstream>
#include <string>
#include <arpa/inet.h>
#include <openssl/ssl.h>

using namespace std;

int sock;
struct sockaddr_in client;
int PORT = 80;

int main(int argc, char const *argv[])
{
    bzero(&client, sizeof(client));
    client.sin_family = AF_INET;
    client.sin_port = htons( PORT );
    client.sin_addr.s_addr = inet_addr("172.16.0.6");

    sock = socket(AF_INET, SOCK_STREAM, 0);

    if (sock < 0) {
        cout << "Error creating socket." …
Run Code Online (Sandbox Code Playgroud)

c++ sockets https openssl

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

Nginx配置代理传递给外部ip和端口(https - > http)

我有一些复杂的服务配置.

我的域名(暂时称之为"a.team")指向我的1&1云服务器,其中运行dockerized的不同服务具有dockerized nginx.许多子域指向docker容器,一切都很好.

现在我在办公室有一台服务器,端口8080,8090和7990(Atlassian产品)可以通过路由器fw和静态ip访问(工作正常).

我希望云服务器像这样管理域和代理:

SSL https://jira.a.team到非SSL http://---.---.--- 133:8080(虚拟)作为代理(以及其他产品)

Nginx配置为将所有http重定向到https:

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;  
    return 301 https://$host$request_uri;
}
server {
    listen 443 default_server ssl;
    server_name _;
    ssl_certificate /path/bundle.cer;
    ssl_certificate_key /path/-.a.team_private_key.key;
}
Run Code Online (Sandbox Code Playgroud)

我想将新配置添加到现有配置中.

server {
    listen 443 ssl;
    server_name jira.a.team;

    location / {
        proxy_pass http://---.---.---.133:8080;
        proxy_redirect off;
    }
}
Run Code Online (Sandbox Code Playgroud)

我尝试了许多与主机,x-real-ip和x-forwarded-for的代理集头的组合,但我得到的是504网关超时.

谢谢你的帮忙!

问候

ssl https proxy redirect nginx

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

WinRm-由于不正确的SSL证书,无法在HTTPS上创建WinRM侦听器

我想将WinRM与https传输一起使用。我已经购买了Comodo证书(错误状态,我无法使用自签名证书),并且主题与我的Windows 10计算机(未加入域)的FQDN(系统中的完整计算机名)相匹配:

CN = my.domain.net 
OU = PositiveSSL 
OU = Domain Control Validated
Run Code Online (Sandbox Code Playgroud)

尝试使用以下命令创建https侦听器时:

WintRm quickconfig -transport:https

我收到错误消息:

错误号:-2144108267 0x80338115无法在HTTPS上创建WinRM侦听器,因为该计算机没有适当的证书。要用于SSL,证书必须具有与主机名匹配的CN,适用于服务器身份验证,并且不能过期,吊销或自签名。

我已经在多个商店(本地计算机/个人和受信任的根证书颁发机构)中安装(双击* .crt文件)证书,但是WinRM无法创建https侦听器。http侦听器运行正常。

一些额外的信息:使用certreq尝试安装*.cer证书时,出现错误消息:

找不到元素。0x80070490(WIN32:1168 ERROR_NOT_FOUND)

如何使WinRM与https一起使用?

ssl https ssl-certificate winrm certreq

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

SSL固定和证书验证之间的区别

有人可以解释在这里使用自签名证书验证证书之间的区别:

https://jetforme.org/2013/05/validating-a-self-signed-ssl-certificate-in-ios-and-os-x-against-a-changing-host-name/

和SSL固定如下所述:

https://infinum.co/the-capsized-eight/how-to-make-your-ios-apps-more-secure-with-ssl-pinning

  • 什么SecPolicyCreateSSL意思?
  • 详细的是SecTrustEvaluate做什么的?
  • 第一个链接中的过程是否包括SSL固定?
  • 如果没有,那么实施两者是否是个好主意?

谢谢

ssl https self-signed pinning ios

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

使用axios.get时,套接字挂断,但使用https.get时,套接字挂断

据我所知,我正在使用两种不同的方法来做同一件事:

const https = require("https");
const axios = require("axios");

let httpsAgent = new https.Agent({rejectUnauthorized: false});

axios.get(`https://${hostname}:${port}${path}`, {httpsAgent})
    .then((data) => { console.log("axios success: " + data.substr(0, 100)); })
    .catch((error) => { console.log("axios error: " + error); });

let data = "";
https.get({ hostname, path, port, agent: httpsAgent },
    (response) => {
        response.on("data", (chunk) => { data += chunk; });
        response.on("end", () => { console.log("https success: " + data.substr(0, 100)); });
    })
    .on("error", (error) => { console.log("https error: " + error); }); …
Run Code Online (Sandbox Code Playgroud)

javascript https node.js node-https axios

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