Use PEM format RSA private key with eap_example

It looks like GnuTLS does not know how to parse the previously used
DER-formatted PKCS#1 private key (server.key). To work around this, use
a PEM-formatted version of the same key. This format can now be used by
OpenSSL, GnuTLS, and the internal TLS implementation.
This commit is contained in:
Jouni Malinen 2009-08-16 09:35:31 +03:00
parent c91231c912
commit 79ec5264ed
2 changed files with 18 additions and 2 deletions

View file

@ -84,8 +84,9 @@ static int eap_example_server_init_tls(void)
os_memset(&tparams, 0, sizeof(tparams));
tparams.ca_cert = "ca.pem";
tparams.client_cert = "server.pem";
tparams.private_key = "server.key";
tparams.private_key_passwd = "whatever";
/* tparams.private_key = "server.key"; */
tparams.private_key = "server-key.pem";
/* tparams.private_key_passwd = "whatever"; */
if (tls_global_set_params(eap_ctx.tls_ctx, &tparams)) {
printf("Failed to set TLS parameters\n");