From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v3 2/2] unit: update test-eapol to new ELL APIs
Date: Tue, 01 Oct 2019 14:38:09 -0700 [thread overview]
Message-ID: <20191001213809.8471-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20191001213809.8471-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
---
unit/test-eapol.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/unit/test-eapol.c b/unit/test-eapol.c
index c43fe278..109c93bb 100644
--- a/unit/test-eapol.c
+++ b/unit/test-eapol.c
@@ -2906,6 +2906,9 @@ static void eapol_sm_test_tls(struct eapol_8021x_tls_test_state *s,
struct eapol_key *step1, *step2, *step3, *step4;
uint8_t ptk_buf[64];
uint8_t *ptk;
+ struct l_certchain *server_cert;
+ struct l_key *server_key;
+ struct l_queue *ca_cert;
aa = ap_address;
spa = sta_address;
@@ -2955,9 +2958,13 @@ static void eapol_sm_test_tls(struct eapol_8021x_tls_test_state *s,
s->tx_buf_len = 0;
s->tx_buf_offset = 0;
- assert(l_tls_set_auth_data(s->tls, CERTDIR "cert-server.pem",
- CERTDIR "cert-server-key-pkcs8.pem", NULL));
- assert(l_tls_set_cacert(s->tls, CERTDIR "cert-ca.pem"));
+ server_cert = l_pem_load_certificate_chain(CERTDIR "cert-server.pem");
+ server_key = l_pem_load_private_key(CERTDIR "cert-server-key-pkcs8.pem",
+ NULL, NULL);
+ ca_cert = l_pem_load_certificate_list(CERTDIR "cert-ca.pem");
+
+ assert(l_tls_set_auth_data(s->tls, server_cert, server_key));
+ assert(l_tls_set_cacert(s->tls, ca_cert));
assert(l_tls_start(s->tls));
ths->handshake_failed = false;
--
2.17.1
next prev parent reply other threads:[~2019-10-01 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 21:38 [PATCH v3 1/2] eap-tls-common: update to new ELL TLS APIs James Prestwood
2019-10-01 21:38 ` James Prestwood [this message]
2019-10-02 15:38 ` [PATCH v3 2/2] unit: update test-eapol to new ELL APIs Denis Kenzior
2019-10-02 15:43 ` [PATCH v3 1/2] eap-tls-common: update to new ELL TLS APIs Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191001213809.8471-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox