summaryrefslogtreecommitdiff
path: root/zen/open_ssl.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/open_ssl.h')
-rw-r--r--zen/open_ssl.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/zen/open_ssl.h b/zen/open_ssl.h
index 350e3776..2b0c7245 100644
--- a/zen/open_ssl.h
+++ b/zen/open_ssl.h
@@ -20,9 +20,9 @@ void openSslTearDown();
enum class RsaStreamType
{
- pkix, //base-64-encoded SubjectPublicKeyInfo structure ("BEGIN PUBLIC KEY")
- pkcs1, //base-64-encoded RSA number and exponent ("BEGIN RSA PUBLIC KEY")
- pkcs1_raw
+ pkix, //base-64-encoded X.509 SubjectPublicKeyInfo structure ("BEGIN PUBLIC KEY")
+ pkcs1, //base-64-encoded PKCS#1 RSAPublicKey: RSA number and exponent ("BEGIN RSA PUBLIC KEY")
+ raw //raw bytes: DER-encoded PKCS#1
};
//verify signatures produced with: "openssl dgst -sha256 -sign private.pem -out file.sig file.txt"
@@ -34,6 +34,10 @@ void verifySignature(const std::string& message,
std::string convertRsaKey(const std::string& keyStream, RsaStreamType typeFrom, RsaStreamType typeTo, bool publicKey); //throw SysError
+bool isPuttyKeyStream(const std::string& keyStream);
+std::string convertPuttyKeyToPkix(const std::string& keyStream, const std::string& passphrase); //throw SysError
+
+
class TlsContext
{
public:
bgstack15