- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试使用 powershell ps1 文件中的 netsh http 添加 sslcert,但它不断抛出错误:
$guid = [guid]::NewGuid()
netsh http add sslcert ipport=0.0.0.0:443 certhash=5758B8D8248AA8B4E91DAA46F069CC1C39ABA718 appid={$guid}
'JABnAHUAaQBkAA' is not a valid argument for this command.
The syntax supplied for this command is not valid. Check help for the correct syntax.
Usage: add sslcert [ipport=]<IP Address:port>
[certhash=]<string>
[appid=]<GUID>
[[certstorename=]<string>
[verifyclientcertrevocation=]enable|disable
[verifyrevocationwithcachedclientcertonly=]enable|disable
[usagecheck=]enable|disable
[revocationfreshnesstime=]<u-int>
[urlretrievaltimeout=]<u-int>
[sslctlidentifier=]<string>
[sslctlstorename=]<string>
[dsmapperusage=]enable|disable
[clientcertnegotiation=]enable|disable]
参数:
Tag Value
ipport - IP address and port for the binding.
certhash - The SHA hash of the certificate. This hash
is 20 bytes long and specified as a hex
string.
appid - GUID to identify the owning application.
certstorename - Store name for the certificate. Defaults
to MY. Certificate must be stored in the
local machine context.
verifyclientcertrevocation - Turns on/off verification of revocation
of client certificates.
verifyrevocationwithcachedclientcertonly - Turns on/off usage of
only cached client
certificate for revocation checking.
usagecheck - Turns on/off usage check. Default is enabled.
revocationfreshnesstime - Time interval to check for an updated
certificate revocation list (CRL). If this
value is 0, then the new CRL is updated
only if the previous one expires. (in
seconds)
urlretrievaltimeout - Timeout on attempt to retrieve certificate
revocation list for the remote URL.
(in milliseconds)
sslctlidentifier - List the certificate issuers that can
be trusted. This list can be a subset of
the certificate issuers that are trusted
by the machine.
sslctlstorename - Store name under LOCAL_MACHINE where
SslCtlIdentifier is stored.
dsmapperusage - Turns on/off DS mappers. Default is
disabled.
clientcertnegotiation - Turns on/off negotiation of certificate.
Default is disabled.
Remarks: adds a new SSL server certificate binding and corresponding client
certificate policies for an IP address and port.
Examples:
add sslcert ipport=1.1.1.1:443 certhash=0102030405060708090A0B0C0D0E0F1011121314 appid={00112233-4455-6677-8899
-AABBCCDDEEFF}
我可能是错的,但我相信这与我如何在我的 powershell 脚本文件中指定 appid GUID 有关。有人可以帮我解决错误吗?
最佳答案
Powershell 解析 cmd 命令的方式有问题。这将成功执行命令:
$guid = [guid]::NewGuid()
$Command = "http add sslcert ipport=0.0.0.0:443 certhash=5758B8D8248AA8B4E91DAA46F069CC1C39ABA718 appid={$guid}"
$Command | netsh
关于http - 为什么 netsh http add sslcert 从 Powershell ps1 文件中抛出错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15212190/
我有一个 OWIN 托管的 Web API 2,我正在尝试使用 SSL。我已经在服务器上安装了证书。我可以在 Certificates - Current user\Trusted Root Cert
我开发了一个自托管的 api。 api 流量需要通过 SSL 运行。 使用 netsh 命令的组合,我成功地添加了证书,然后将路由绑定(bind)到我的服务。快乐的日子。 但是,我必须编写一个安装程序
我正在尝试通过加密和安全的连接让我的应用程序连接到我的 PostgreSQL 实例。 我已经配置了我的服务器证书并生成了客户端证书和 key 文件。 以下命令连接没有问题: psql "sslmode
在windows服务中托管WCF服务时,我们可以使用netsh http add urlacl url=https://+:1234/xService user=DOMAIN\USER 然后要添加 S
按照 How to: Configure a Port with an SSL Certificate中的说明进行操作,我在命令行中输入了这个命令(废话): netsh http add sslcer
我正在尝试使用 powershell ps1 文件中的 netsh http 添加 sslcert,但它不断抛出错误: $guid = [guid]::NewGuid() netsh http add
我正在尝试托管一项服务,该服务使用 WebHttpBinding 提供基本 Web 内容(HTML、javascript、json),管理员参与最少。 到目前为止,我已经成功了,唯一需要的管理员权限是
我希望进行一些幂等的飞行前检查,并且我想在破坏 SSL 证书之前进行测试。 Netsh seems to be deprecated , "...It is recommended that you
我是一名优秀的程序员,十分优秀!