[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

@@ -1115,7 +1115,7 @@ static DWORD WINAPI test_peer_mainloop(LPVOID arg)
goto fail;
}
rdpPrivateKey* key = freerdp_key_new_from_file(info->key);
rdpPrivateKey* key = freerdp_key_new_from_file_enc(info->key, NULL);
if (!key)
goto fail;
if (!freerdp_settings_set_pointer_len(settings, FreeRDP_RdpServerRsaKey, key, 1))