GnuPG + Web服务+ ASP.NET [英] GnuPG + Webservice + ASP.NET

查看:98
本文介绍了GnuPG + Web服务+ ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很累.我已经安装了GnuPG并从另一个GnuPG实例导出了秘密密钥和两个公共密钥(我自己和我的一个客户端).我尝试在本地计算机上配置我的加密/解密"方法.

I'm exhausted. I have installed GnuPG and exported secret key, and two public keys (my own and one of my client) from another instance of GnuPG. I try to configure 'my encrypting/decrypting' method on the local machine.

当我从一个小的控制台应用程序运行加密方法时,它的效果很好.当我从本地计算机上的Web服务运行此方法(相同!-具有相同的正文)时,我的ExitCode = 2.

When I run encrypting method from a little console application it works good. When I run this (same! - with the same body) method from my webservice on my local machine ... I have an ExitCode = 2.

实际上很高兴收到错误消息,但对他们的身体不满意.

Happy in fact of catching the error message, but unhappy with their body.

"gpg:无默认密钥:密钥不可用gpg:XXXXXXXXXXXXXXXX.xml:登录+加密失败:密钥不可用"

"gpg: no default secret key: secret key not available gpg: XXXXXXXXXXXXXXXX.xml: sign+encrypt failed: secret key not available"

我该怎么办?怎么了?

最诚挚的问候,卡罗尔·布拉德克(Karol Bladek)

Best regards, Karol Bladek

推荐答案

密钥环文件是基于每个用户创建的.在运行控制台应用程序时,它将在您的目录中查找PGP密钥环文件,而在Web服务中运行时,它将在该Web服务使用的用户标识的目录中查找.

The keyring files are created on per user basis. When running the console application, it will look for the PGP keyring files in your directory, whereas when running in the web service, it will look in the directory of the user identity used by the web service.

继续打开cmd,转到GPG安装目录,然后键入gpg -h.在顶部附近的某个位置,它将为您显示登录用户的密钥环文件所在的路径.

Go ahead open up cmd, change to the GPG install directory and type in gpg -h. Somewhere near the top it will show you the path where the keyring files are located for your logged on user.

您可以采取的解决措施是将密钥环文件复制到Web服务用户希望找到的位置.不确定gpg是否提供任何命令行选项来选择其他密钥环文件位置.

What you can do to fix this is to copy the keyring files to where it expected to find it for the web service user. Not sure if there's any command line option for gpg to select a different keyring file location.

这篇关于GnuPG + Web服务+ ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆