值得信赖的是不安全的组件未运行
我只是在测试内部的东西,现在可信赖的是安全风险。
- 不过,我想知道,如果
Trust Worthy
是上的,不安全
是否可以签署并具有.pfx,请停止工作。
其中的密钥文件? - 不确定是在几年前与该证书创建的证书,还是证书或钥匙可以到期?
这个问题与: SQL CLR组装设置为不安全的键不再工作
I am just testing something internal and now the TRUSTWORTHY is set to ON security risks.
- I am wondering though, if
TRUSTWORTHY
isON
, can anUNSAFE
assembly stop working if it is signed and and has a.pfx
key file in it? - Not sure if a certificate was created with it years ago or either the certificate or key can expire?
This question relates to: A SQL CLR Assembly set to UNSAFE with a key is no longer working
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果
trustworthy
是上的代码>,则不需要模块签名。另外,组件不包含 .pfx 文件。 pfx 文件是一个包含私钥的密码保护文件。一个组件,如果用证书签名(或SNK /非对称密钥),则包含公共密钥,用于验证。< / p>
不,您不必担心证书的到期日期(尤其是在仅验证已签署的内容时,这就是这里发生的一切)。
如果您想知道是否已通过强名密钥(SNK) /非对称键签署了一个组件,请查看汇编属性(例如
选择名称,clr_name,clr_name from sys.semblies; < / code; < / code < / code >)。如果“ publicKeyToken”(在
clr_name
中)具有一个值(即不是“ null”),则汇编已被强烈命名(即使用非对称键签名)。)。
如果您想知道是否已通过证书签署了一个组件,只需尝试从该组件创建证书:
如果大会已签署了证书,则创建语句将成功。然后,丢弃证书。
如果没有使用证书签署组件,您将获得以下错误:
请注意,可以使用非对称键和一个或多个证书签署一个组件。
If
TRUSTWORTHY
isON
, then module signing isn't required.Also, assemblies do not contain .pfx files. The pfx file is a password-protected file that contains the private key. An assembly, if signed with a certificate (or snk / asymmetric key), contains the public key, which is used for validation.
No, you needn't worry about the certificate's expiration date (especially not when merely validating something that has been signed, which is all that is happening here).
If you want to know if an assembly has been signed by a strong-name key (snk) / asymmetric key, just look at the assembly properties (e.g.
SELECT name, clr_name FROM sys.assemblies;
). If "publickeytoken" (inclr_name
) has a value (i.e. not "null"), then the assembly has been strongly-named (i.e. signed with an asymmetric key).If you want to know if an assembly has been signed by a certificate, simply try to create a certificate from that assembly:
If the assembly was signed with a certificate, the CREATE statement will succeed. Then, drop the certificate.
If the assembly was not signed with a certificate, you will get the following error:
Please note that it is possible to sign an assembly with an asymmetric key and one or more certificates.