aboutsummaryrefslogtreecommitdiffstats
path: root/eap_example/eap_example_server.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-08-16 06:35:31 (GMT)
committerJouni Malinen <j@w1.fi>2009-08-16 06:35:31 (GMT)
commit79ec5264ed3767f5f8c303996f9e79e1f4359bbf (patch)
tree9e1da6f1f68b46d5b17dd7d74545a2c645174e5a /eap_example/eap_example_server.c
parentc91231c912a4cb5ef1f151cbe60be4e7d06a379d (diff)
downloadhostap-79ec5264ed3767f5f8c303996f9e79e1f4359bbf.zip
hostap-79ec5264ed3767f5f8c303996f9e79e1f4359bbf.tar.gz
hostap-79ec5264ed3767f5f8c303996f9e79e1f4359bbf.tar.bz2
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.
Diffstat (limited to 'eap_example/eap_example_server.c')
-rw-r--r--eap_example/eap_example_server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eap_example/eap_example_server.c b/eap_example/eap_example_server.c
index 897aa26..0e28995 100644
--- a/eap_example/eap_example_server.c
+++ b/eap_example/eap_example_server.c
@@ -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");