summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2022-01-11 19:08:08 +0000
committerjsing <>2022-01-11 19:08:08 +0000
commit9c34baf70c4739d0533e2fd4fe0c75a5acdbd135 (patch)
treeaa42a64ad4deca272541d66e59c01e32c3fcfd9a
parent29dd08f9d36c1e143430c23b6c134c873648b8f4 (diff)
downloadopenbsd-9c34baf70c4739d0533e2fd4fe0c75a5acdbd135.tar.gz
openbsd-9c34baf70c4739d0533e2fd4fe0c75a5acdbd135.tar.bz2
openbsd-9c34baf70c4739d0533e2fd4fe0c75a5acdbd135.zip
Revise for peer_cert.
-rw-r--r--src/regress/lib/libssl/asn1/asn1test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/regress/lib/libssl/asn1/asn1test.c b/src/regress/lib/libssl/asn1/asn1test.c
index 9898b91ed3..4feeff9e2f 100644
--- a/src/regress/lib/libssl/asn1/asn1test.c
+++ b/src/regress/lib/libssl/asn1/asn1test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1test.c,v 1.9 2021/10/23 08:13:52 jsing Exp $ */ 1/* $OpenBSD: asn1test.c,v 1.10 2022/01/11 19:08:08 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014, 2016 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014, 2016 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -330,10 +330,10 @@ session_cmp(SSL_SESSION *s1, SSL_SESSION *s2)
330 } 330 }
331 331
332 /* Ensure that a certificate is or is not present in both. */ 332 /* Ensure that a certificate is or is not present in both. */
333 if ((s1->peer != NULL || s2->peer != NULL) && 333 if ((s1->peer_cert != NULL || s2->peer_cert != NULL) &&
334 (s1->peer == NULL || s2->peer == NULL || 334 (s1->peer_cert == NULL || s2->peer_cert == NULL ||
335 X509_cmp(s1->peer, s2->peer) != 0)) { 335 X509_cmp(s1->peer_cert, s2->peer_cert) != 0)) {
336 fprintf(stderr, "peer differs\n"); 336 fprintf(stderr, "peer_cert differs\n");
337 return (1); 337 return (1);
338 } 338 }
339 339
@@ -377,7 +377,7 @@ do_ssl_asn1_test(int test_no, struct ssl_asn1_test *sat)
377 int i, len, rv = 1; 377 int i, len, rv = 1;
378 378
379 if (sat->peer_cert) 379 if (sat->peer_cert)
380 sat->session.peer = peer_cert; 380 sat->session.peer_cert = peer_cert;
381 381
382 len = i2d_SSL_SESSION(&sat->session, NULL); 382 len = i2d_SSL_SESSION(&sat->session, NULL);
383 if (len != sat->asn1_len) { 383 if (len != sat->asn1_len) {