[crypto,key] add function to export PEM and create a key

* freerdp_key_generate creates a new key
* freerdp_key_get_pem exports the key as PEM
This commit is contained in:
akallabeth
2025-04-22 10:56:13 +02:00
parent 0eefdbdb40
commit 2fb2e5f9c5
10 changed files with 192 additions and 19 deletions

View File

@@ -925,7 +925,7 @@ static BOOL shadow_server_init_certificate(rdpShadowServer* server)
rdpSettings* settings = server->settings;
WINPR_ASSERT(settings);
rdpPrivateKey* key = freerdp_key_new_from_file(server->PrivateKeyFile);
rdpPrivateKey* key = freerdp_key_new_from_file_enc(server->PrivateKeyFile, NULL);
if (!key)
goto out_fail;
if (!freerdp_settings_set_pointer_len(settings, FreeRDP_RdpServerRsaKey, key, 1))