<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I have a public and private key on a Windows web server that I am
able to use without problems using DOS commands. I can do import,
encrypt, decrypt, list-secret-keys etc. I am trying to do the same
from a web page. From a C# asp.net web page using the Process class,
I can import a public key and encrypt a file. But I can not decrypt
a file from the web page. From the web page, when I do a
--list-keys, it only lists the public keys. From the web page, when
I do a --list-secret-keys, it lists nothing.<br>
<br>
When I try to decrypt, the error output is:<br>
<span style="color: rgb(36, 39, 41); font-family: Arial,
"Helvetica Neue", Helvetica, sans-serif; font-size:
15px; font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">gpg: encrypted with 2048-bit RSA key, ID
AAAAAAAAAAAAAAAA, created 2019-12-06 "Company A " gpg: decryption
failed: No secret key<br>
<br>
My gpg cmd is:<br>
</span><span style="color: rgb(36, 39, 41); font-family: Arial,
"Helvetica Neue", Helvetica, sans-serif; font-size:
15px; font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><span style="color: rgb(36, 39, 41);
font-family: Arial, "Helvetica Neue", Helvetica,
sans-serif; font-size: 15px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: 400; letter-spacing: normal; orphans: 2;
text-align: left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">gpg --batch
--trust-model always --pinentry-mode loopback --passphrase
"xxxxxxxxxx" --output "D:\Websites\test.txt" --decrypt
"D:\Websites\test.pgp"<br>
<br>
</span></span>How can I access the secret-key from the web page?<br>
<br>
thanks<br>
</body>
</html>