在certmanager中看不到自己创建的证书?(Cannot see self created certificate in certmanager?)
我按照答案中的步骤创建了证书。 我将在自己的计算机上使用此证书。 该命令成功,但我在证书管理器(certmgr.msc)中看不到任何个人证书。 解答 - 如何通过SSL本地测试双向身份验证创建客户端证书?
脚步:
1)启动Vs2010命令提示符:开始 - >所有程序 - > Visual Studio 2010 - > Visual Studio工具 - > Visual Studio命令提示符(右键单击并以管理员身份运行)
2)创建一个自签名(-r)私钥可导出(-pe),保存到本地机器(本地计算机,sr localmachine)下的个人文件夹(-ss my),命名为(-n)“YangsoftCA”,常见名称(-in)“Yangsoft.com”,私钥文件(-sv)为“YangsoftCA.pvk”,公钥文件为“YangsoftCA.cer”
命令:
C:\ Windows \ system32> makecert -r -pe -ss my -sr LocalMachine -n“CN = YangsoftCA”-sv“YangsoftCA.pvk”YangsoftCA.cer
成功
提示密码保护私钥文件
这就是我的证书经理的样子。 根据个人证书没有任何内容。 我希望yangsoft会出现在那里。
我如何知道发生了什么以及如何查看我的证书?
I followed the steps in my answer to create a certificate. I will use this cert on my own computer. The command succeeded, but I see no personal certificate in cert manager (certmgr.msc). Answer - How do I create client certificates for local testing of two-way authentication over SSL?
Steps:
1) Launch Vs2010 Command Prompt: Start -> All Programs -> Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (right click and Run as Administrator)
2) Create a self-signed (-r), private key exportable (-pe), saving to personal folder (-ss my) under local machine (Local Computer, sr localmachine), named (-n) “YangsoftCA”,common name (-in) “Yangsoft.com” with private key file (-sv) as “YangsoftCA.pvk” and public key file “YangsoftCA.cer”
Command:
C:\Windows\system32>makecert -r -pe -ss my -sr LocalMachine -n “CN=YangsoftCA” -sv “YangsoftCA.pvk” YangsoftCA.cer
Succeeded
Password was prompted to secure the private key file
This is what my cert manager looks like. There is nothing under personal certificates. I was hoping that yangsoft would appear there.
How do I find out what happened and how do I see my cert ?
原文:https://stackoverflow.com/questions/22314341
最满意答案
没有。即使是
pylint
,我所知道的最强大,最pylint
的Pythonpylint
,也不足以发现这种情况。 但如果是的话,它可能会抱怨你首先使用的是locals()
。 :)另一方面,与pyflakes不同,pylint确实支持魔术注释以忽略特定问题。 但我必须警告你,pylint非常挑剔(因此很慢)开箱即用,因此你需要花几分钟时间将其检查清单减少到你真正关心的事情。
在特定的字符串格式化的情况下,有一个票据关闭为wontfix以改善此行为。 看来pylint开发人员不希望将其作为一项功能实现。
No. Even
pylint
, the most powerful and nitpicky Python linter I'm aware of, isn't clever enough to detect this case. But if it were, it would probably complain that you're usinglocals()
in the first place. :)On the other hand, and unlike pyflakes, pylint does support magic comments to ignore specific problems. But I must warn you that pylint is extremely picky (and thus slow) out of the box, so you'll want to spend a few minutes upfront to cut its list of checks down to just the things you actually care about.
There is a ticket closed as wontfix for improving this behavior in the specific case of string formatting. It appears that pylint developers don't want to implement this as a feature.
相关问答
更多-
那么,我认为这是一个执行错误或一个无证的设计决定。 问题的关键在于模块范围中的名称绑定操作应绑定到全局变量。 它的实现方式是,当在模块级别时,globals()IS locals()(在解释器中尝试一个),所以当你做任何名字绑定时,它像往常一样分配给本地人)字典,这也是全局变量,因此创建了一个全局变量。 查找变量时,首先检查当前的本地人,如果找不到名称,则递归检查包含变量名的范围的局部变量,直到找到变量或到达模块范围。 如果你达到这个目的,你检查应该是模块范围本地人的全局变量。 >>> exec(compi ...
-
标准实现完全不使用它的locals参数,并且仅使用它的globals来确定import语句的包上下文。 (来自docs.python.org ) 我仍然不知道如何使用globals 。 什么样的全局变量会影响import语句的工作方式? 编辑:在Python 2.5源代码中查看import.c之后,我发现__import__希望在globals中找到__name__或__path__ ,以便按照该顺序扩大与在其中一个变量中找到的路径相关的导入搜索路径。 The standard implementation ...
-
Python在默认情况下将全名查找为全局变量; 只有在函数中分配的名称才会被查找为本地语言(因此任何名称都是函数的参数或者在函数中分配给它的名称)。 当您使用dis.dis()函数来反编译代码对象或函数时,您可以看到这一点: >>> import dis >>> def func(x): ... return cos(x) ... >>> dis.dis(func) 2 0 LOAD_GLOBAL 0 (cos) 3 L ...
-
没有。即使是pylint ,我所知道的最强大,最pylint的Python pylint ,也不足以发现这种情况。 但如果是的话,它可能会抱怨你首先使用的是locals() 。 :) 另一方面,与pyflakes不同,pylint确实支持魔术注释以忽略特定问题。 但我必须警告你,pylint非常挑剔(因此很慢)开箱即用,因此你需要花几分钟时间将其检查清单减少到你真正关心的事情。 在特定的字符串格式化的情况下,有一个票据关闭为wontfix以改善此行为。 看来pylint开发人员不希望将其作为一项功能实现。 ...
-
那是因为在这种情况下,你正在global范围内调用locals 。 locals在当前范围内获取值,而globals值则返回global范围内的所有值。 这意味着如果你在global范围内调用locals ,他们将是一样的。 例如,当您在非global范围内调用locals时会发现区别; 把你的列表理解(这是可以的,但是需要进行一些修改): >>> def example(a, b, c): ... return [k for k in locals().keys() if k not in glo ...
-
JS没有任何机会隐藏对象的私有成员。 所以通常的做法是_开始它们。 这意味着使用_开头的成员,例如obj._locals,是不正确的。 JS doesn't have any opportunities to hide private members of object. So common practice is start them by _. It's means that using members started by _, e.g obj._locals, is not correct.
-
locals()内置函数打印绑定到代码对象的本地符号表,并在解释器在源代码中接收名称时填充。 第二个例子,当反汇编时,将在b函数代码中包含LOAD_GLOBAL foo字节码指令。 这个LOAD_GLOBAL指令将向上移动范围,找到外部foo名称并通过将名称偏移量添加到闭包(函数b)代码对象的co_names属性中将其绑定到代码对象。 locals()函数打印本地符号表(如前所述,函数的代码对象的co_names属性)。 阅读更多有关代码对象的信息 locals() built-in function pr ...
-
从Task.Run返回Tuple ,如下所示: public Task
> DoWorkAsync(object[] objs) { return Task.Run(() => { string msg; var result = _foo.DoWork(objs, out msg); return new Tuple (result, msg); }); } 现在您不 ... -
Vim Syntastic:如何找出当前使用的语法检查程序?(Vim Syntastic: How to find out which syntax checker is currently in use?)[2022-10-06]
Syntastic具有内置功能。 我相信哪些语法检查器可用取决于您的系统。 :SyntasticInfo Syntastic info for filetype: python Available checkers: python Currently active checker(s): python Press ENTER or type command to continue Syntastic has a built-in function for this. I believe which sy ... -
如果你阅读了locals函数的文档 ,你会看到 更新并返回表示当前本地符号表的字典。 locals()在函数块中调用时返回自由变量,但在类块中不调用。 locals()不只返回局部变量的字典; 它还会更新 dict以反映当前的局部变量值。 If you read the docs for the locals function, you'll see Update and return a dictionary representing the current local symbol table. Fre ...