HTTPS.SYS怎样使用HTTPS
HTTPS.SYS怎样使用HTTPS
参考了MORMOT的官方文档:http://blog.synopse.info/post/2013/09/04/HTTPS-communication-in-mORMot
HTTPS.SYS同时支持HTTP和HTTPS。
HTTP由于不需要SSL证书,使用非常简单,这里只对使用HTTPS作说明。
你仅仅需要做的:就是将SSL证书绑定到您将要使用的HTTPS连接端口。
你不需要任何额外的SSL库被安装或部署在客户端或服务器。所有的SSL通信在操作系统底层已经做好了。
怎样将SSL证书绑定到要使用的HTTPS连接端口?
首先,必须确保您的证书已在Windows证书存储库中安装/导入。还要注意,必须将其安装到本地机器存储区,而不是当前用户。

可以使用Windows 自带的 netsh 命令行工具。
NETSH工具如何使用?
NETSH.EXE操作SSL
程序位置:c:\windows\syswow64\netsh.exe
查看当前端口配置
netsh http show sslcert
将 SSL 证书绑定至端口号
URL预订
运行 windows命令行工具(cmd.exe) 使用管理员权限并执行下面的命令:
netsh http add urlacl url=http://+:2001/tms/business/ user=%USERDOMAIN%\%USERNAME%
where %USERDOMAIN% and %USERNAME% are the domain and name of the user under which your server will run. For testing purposes, you can just give access to any user:
netsh http add urlacl url=http://+:2001/tms/business/ user=Everyone
Note that if the language of your Windows is not English, you must need to change "Everyone" by the name of the group that represents all users in Windows. Or, alternatively, provide the ssdl of the "everyone" group (or any other group you want to give permission to, for example replace "WD" by "NS" to provide access to network service.
netsh http add urlacl url=http://*:2001/tms/business/ sddl=D:(A;;GA;;;WD)
Server Certificate Configuration (binding to a port)
Run windows command line tool (cmd.exe) under administrative rights and use a command like this:
netsh http add sslcert ipport=0.0.0.0:2002 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}
The above command will bind the proper certificate to port 2002. There are three parameters in the command above that you need to change for your own usage:
ipport: You must use the port number you use for HTTPS connections. In the example, it was 2002. The IP can still be 0.0.0.0 which means any IP.
certhash: You must provide the thumbprint of the certificate you want to use for your server. You can check the thumbprint by using Microsoft Management Console.
appid: This can be any arbitrary GUID. You just need to generate one and input it here. You can even use the GUID generator in Delphi code editor (while editing code, just press Shift+Ctrl+G, Delphi will generate a GUID for you). The GUID must be enclosed by brackets.
删除端口号的 SSL 证书
Netsh http delete sslcert ipport=0.0.0.0:8005 一旦您在上面的命令中注册了证书,您的服务器就被配置成使用安全连接。 如果您没有证书,还可以生成一个自签名证书以供测试之用。那你需要makecert.exe或OPENSSL.EXE工具,
可当你安装微软Visual Studio或Windows SDK。生成自签名证书超出了本文档的范围,但以下链接可能有助于完成此类任务。
HTTPS.SYS怎样使用HTTPS的更多相关文章
- 咏南中间件增加HTTPS.SYS支持
咏南中间件增加HTTPS.SYS支持 老客户可免费升级. HTTPS.SYS可以开发强大而稳定的REST SERVER. 微软在Windows Vista (server 2008) 以后使用http ...
- TSQLDBServerHttpApi一个使用HTTPS.SYS内核的数据库服务端控件
TSQLDBServerHttpApi一个使用HTTPS.SYS内核的数据库服务端控件 在WINDOWS操作系统,TSQLDBServerHttpApi使用HTTPS.SYS作为通信内核,而HTTPS ...
- 从 HTTP 到 HTTPS - IIS 部署免费 HTTPS
这篇文章首发于我的个人网站:听说 - https://tasaid.com/,建议在我的个人网站阅读,拥有更好的阅读体验. 这篇文章与 博客园 和 Segmentfault 共享. 前端开发QQ群:3 ...
- 如何申请https证书、搭建https网站
如何申请https证书.搭建https网站 随着国内搜索引擎巨头百度启用全站https加密服务,全国掀起了网站https加密浪潮.越来越多的站点希望通过部署https证书来解决“第三方”对用户隐私的嗅 ...
- HTTPS那个东西(一)-HTTPS原理
HTTPS那个东西(一) 最近看了<http权威指南>几个章节,对HTTPS随着节,了一些资料,遂打算记录一下心得.写的仓促,肯定有非常多错误的地方,欢迎大家指正. 1.HTTP是什么 那 ...
- Https系列之一:https的简单介绍及SSL证书的生成
Https系列会在下面几篇文章中分别作介绍: 一:https的简单介绍及SSL证书的生成二:https的SSL证书在服务器端的部署,基于tomcat,spring boot三:让服务器同时支持http ...
- HTTPS学习笔记一----HTTPS的基础理论知识
首先推荐一本书,<HTTP权威指南>我就是看这本书入门的,对http协议有了更好的理解,学习https的理论知识我认为需要了解以下几点,需要一步步的深入学习: 1.HTTPS的基本概念? ...
- 您好,前端使用https,后端使用https是会有冲突的情况,所以默认后端都是http 负载均衡即可管理证书,不需要在后端ECS上绑定证书。
您前端使用https,那么前端就是加密的,后端使用https就是会访问出现问题的,目前阿里云负载均衡默认的配置前端使用https,后端默认就是http,也是无法更改的. 前端使用https,目前只有一 ...
- HTTPS那些事儿(一)-HTTPS原理
HTTPS那些事儿(一) 近期看了<http权威指南>的几个章节.对HTTPS有了部分了解,同一时候在网上查阅了一些资料,遂打算记录一下心得,写的仓促,肯定有非常多错误的地方.欢迎大家指正 ...
随机推荐
- [USACO1.3]虫洞
Luogu链接 题目描述 农夫约翰爱好在周末进行高能物理实验的结果却适得其反,导致N个虫洞在农场上(2<=N<=12,n是偶数),每个在农场二维地图的一个不同点. 根据他的计算,约翰知道他 ...
- idea真不习惯啊
http://blog.csdn.net/z69183787/article/details/41416189
- 文本区 JTextArea 的使用
文本区JTextArea是对多行文本进行编辑的组件,用空字符来控制文本的格式.eg:"\n"为换行,"\t"为插入一个Tab字符. 文本去JTextArea的常 ...
- 会议中心[APIO2009]
会议中心 思路 这一题的正解是倍增的,但是由于我太蒟蒻了,所以我选了一个不算正解但是有可以拿满分的题目学习 思路和我考场上其实差不多,只是我无法实现.... 下面我先来介绍几个数组的用途 1.s,s数 ...
- Windows XP SP1 Privilege Escalation
MS05-018 MS05-018 Works for Windows 2K SP3/4 | Windows XP SP1/2 Download ms05-018.exe: https://githu ...
- webdriver函数
import sys; print('%s %s' % (sys.executable or sys.platform, sys.version)) PyDev console: starting. ...
- JavaScript设置获取和设置属性的方法
这篇文章主要介绍了JavaScript设置获取和设置属性的方法,学会使用getAttribute.setAttribute的用法,需要的朋友可以参考下 getAttribute 该方法用来获取元素 ...
- 函数:module_put ( )【转】
转自:http://book.2cto.com/201307/27049.html 文件包含: #include <linux/module.h> 函数定义: 函数在内核源码中的位置:li ...
- Pyhton-Requests之接口测试
非常感谢[百人计划]五娃的分享!下面是整理的笔记: 一.环境准备: Pyhton 2.x或者Pyhton 3.x.Requests库.(我安装的版本是Pyhton 3.4) 安装 Pyhton 3.x ...
- Android 开发实用方法大全
1.格式化价格,这个经常在计算费用精度的时候用到 /** * 格式化价格 * * @param argStr 传入价格字符串 * @return */ public static String get ...