我已阅读 amazon ec2 设置 https 指南并完成了几个步骤。但它仍然不起作用。
最后,我检查了实例的安全组并确保它是正确的。我重新启动实例,https 不起作用。检查80端口健康检查可以通过,但检查443端口不通过。
我错过任何步骤吗?
我正在尝试从 https 网站下载 pdf 文件,但它不起作用。我是 C# 新手,所以做了一些研究并找到了一个简单的代码。更糟糕的是,我得到的异常非常普遍。请帮助。
static void Main(string[] args)
{
string file_ = "https://www.nseindia.com/content/circulars/CMPT34469.pdf";
string path_ = @"E:\RSR\Office\EEP\FileDownloader\output\Hello_World.pdf";
WebClient wc_ = new WebClient();
wc_.DownloadFile(file_, path_);
}
Run Code Online (Sandbox Code Playgroud)
异常:System.dll 中发生类型为“System.Net.WebException”的未处理异常附加信息:远程服务器返回错误:(403) 禁止。
我尝试从这个休息服务中获取数据。我的浏览器工作正常。现在我尝试在VBA中执行此操作以在Excel中显示数据
我相信这与 https 和 TSL 有关。当我用 C# 编写代码并添加这一行时,它就可以工作了。我只是不知道如何在 VBA 中做到这一点
'ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 - object required
Dim reader As New WinHttpRequest
Dim json As New JSONParser
Dim ws As Worksheet: Set ws = ActiveSheet
Dim url As String
url = ws.[EDS_URL]
' reader.Option(9) = 2720 - invalid procedure call
reader.Open "GET", url, False
reader.Send ' automation error
Run Code Online (Sandbox Code Playgroud)
如果没有 TSL 部分,我会在最后一行收到自动化错误
前传:我创建了一个应与我们公司网站交互的 Web 应用程序。我与负责网站的其他开发人员(不同的公司分支机构)远程工作。我对网络开发完全陌生,没有“上线”经验。
我的应用程序使用 tomcat 8.5 在本地公司服务器上运行。公司网站中包含一个 html 页面,它从我的服务器加载不同的 JavaScript 文件(和 css)。与我的应用程序的交互发生在那里。我曾经通过 HTTP 执行此操作,一切正常。例如:
<script src="http://172.17.123.123/MyProject/js/script.js"></script>
Run Code Online (Sandbox Code Playgroud)
问题:现在开发人员告诉我,我应该获取证书并使用 HTTPS 来使我的服务器和公司 Web 服务器之间的通信更加安全。这就是他所做的,因为他管理的网站可以通过 Internet 访问,并且他可以轻松地从受信任的 CA 生成证书。他不知道如何为本地服务器执行此操作。
我设法启用 HTTPS 并使用自签名证书。现在我用
<script src="https://172.17.123.123:8443/MyProject/js/script.js"></script>
Run Code Online (Sandbox Code Playgroud)
但我收到此错误:
无法加载资源:net::ERR_CERT_AUTHORITY_INVALID
我想为我的服务器使用来自 CA 的证书,但了解到不可能为本地主机获取证书。但我没有找到任何有关本地服务器的信息。我想同样的原则也适用。
问题:使用 HTTPS 进行网络服务器和本地公司服务器之间的通信是否有益?如果是这样,我如何生成可信证书?自签名证书就足够了吗?
我在发出 https get 请求时出现以下错误
{ Error: write EPROTO 101057795:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:openssl\ssl\s23_clnt.c:802:
at _errnoException (util.js:992:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) code: 'EPROTO', errno: 'EPROTO', syscall: 'write' }
Run Code Online (Sandbox Code Playgroud)
我正在尝试向不需要代理的公司内部资源发出请求。
const request = require('request')
var token= myToken
request({
method: 'post',
url: 'https://myURL',
data: {
myData
},
headers: { 'Authorization': 'Bearer myToken' },
agentOptions: {
rejectUnauthorized: false,
},
}, function (error, response, body) {
if(error){
console.log('Error: ', error)
} else {
console.log(body)
}
})
Run Code Online (Sandbox Code Playgroud)
我的 .npmrc 中也有 strict-ssl=false 。
我注意到我可以毫无问题地进行相同的调用curl。
curl -k1 …Run Code Online (Sandbox Code Playgroud) 我需要配置我的网站 SSL。我有以下文件:file.csr 和 file.jks
我需要以下文件来启用我的网站的 SSL:file.crt、file.key 和 keystore
我通过互联网进行了搜索,但没有找到任何帮助。谁能告诉我如何使用我已有的文件获取这些文件?
我尝试了多种转换选项,但没有任何效果。
<Connector port="8442" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/conf/keys/server/keystore"
keystorePass="CHANGEME"/>
Run Code Online (Sandbox Code Playgroud) 当我Restservices使用 java等创建时GET,POST我请求它们使用
http protocol. 当我使用 https 时,就会出现错误。
例如: http://localhost:8080/demorest/webapi/aliens工作正常。
但是当我使用相同的查询时https
https://localhost:8080/demorest/webapi/aliens
Run Code Online (Sandbox Code Playgroud)
我收到错误site can not provide secured connection
需要进行哪些修改才能使它们与https.
socket我正在尝试使用和模块使用 Python3 构建一个简单的 HTTPS 服务器ssl。我有一个自签名证书和一个由 OpenSSL 生成的私钥文件,我尝试将它们与 ssl 模块一起使用,但每次尝试时,我都会收到“ ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 警报证书未知 (_ssl. c:1076) “错误。我的代码是
import socket
import ssl
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.load_cert_chain(certfile='cert.pem', keyfile='my_key.key')
context.verify_mode = ssl.CERT_NONE
sock = socket.socket()
sock.bind(('', 443))
sock.listen(5)
while True:
new_conn, addr = sock.accept()
ssl_conn = context.wrap_socket(new_conn, server_side=True)
print(ssl_conn.recv(1024).decode()) # this is where i get the error
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
File "C:\AllInOne\PortableApps\Python374\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1076)
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么会发生这种情况或如何解决它?
我有一个返回alertDialog 的小部件,根据http 请求的结果,我显示另一个alertDialog。螺母我收到以下错误:
[错误:flutter/lib/ui/ui_dart_state.cc(157)] 未处理的异常:'package:flutter/src/widgets/localizations.dart':断言失败:第 447 行 pos 12:'context != null':不是真的。
import 'dart:io';
import 'package:Zabatnee/common_app/provider/user_details_provider.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ForgetPasswordDialog extends StatefulWidget {
static const routeName = '/customeDialog';
final String title,description;
ForgetPasswordDialog({
this.title,
this.description,
});
@override
_ForgetPasswordDialogState createState() => _ForgetPasswordDialogState();
}
class _ForgetPasswordDialogState extends State<ForgetPasswordDialog> {
final emailController = TextEditingController();
var _isLoading = false;
_showDialog(String title, String message) {
showDialog(
barrierDismissible: false,
context: context,
builder: (ctx) => WillPopScope(
onWillPop: () async => false,
child: new AlertDialog(
elevation: 15,
shape: …Run Code Online (Sandbox Code Playgroud) 我有这个代码
$ curl "https://api.weixin.qq.com:443/sns/jscode2session?appid=a&secret=b&js_code=c&grant_type=authorization_code"
Run Code Online (Sandbox Code Playgroud)
它可以从服务器获得如下响应
{"errcode":40013,"errmsg":"invalid appid rid: 5f96703e-5e24e4f1-691a9221"}
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试将主机名替换为 ip 时,我失败并显示以下消息
$ host api.weixin.qq.com
api.weixin.qq.com has address 180.97.7.108
api.weixin.qq.com has address 101.226.212.27
$ curl "https://101.226.212.27:443/sns/jscode2session?appid=a&secret=b&js_code=c&grant_type=authorization_code"
curl: (60) SSL: no alternative certificate subject name matches target host name '101.226.212.27'
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above. …Run Code Online (Sandbox Code Playgroud)