File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/regress/lib/libtls/keypair Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- /* $OpenBSD: keypairtest.c,v 1.4 2018/04/07 16:42:17 jsing Exp $ */
1
+ /* $OpenBSD: keypairtest.c,v 1.5 2021/12/04 09:04:36 tb Exp $ */
2
2
/*
3
3
* Copyright (c) 2018 Joel Sing <jsing@openbsd.org>
4
4
*
@@ -89,7 +89,6 @@ do_keypair_tests(void)
89
89
X509 * x509_cert = NULL ;
90
90
struct tls_keypair * kp ;
91
91
struct tls_error err ;
92
- char * hash = NULL ;
93
92
int failed = 1 ;
94
93
95
94
load_file (cert_file , & cert , & cert_len );
@@ -126,7 +125,7 @@ do_keypair_tests(void)
126
125
goto done ;
127
126
if (strcmp (kp -> pubkey_hash , PUBKEY_HASH ) != 0 ) {
128
127
fprintf (stderr , "FAIL: got pubkey hash '%s', want '%s'" ,
129
- hash , PUBKEY_HASH );
128
+ kp -> pubkey_hash , PUBKEY_HASH );
130
129
goto done ;
131
130
}
132
131
@@ -161,7 +160,7 @@ do_keypair_tests(void)
161
160
goto done ;
162
161
if (strcmp (kp -> pubkey_hash , PUBKEY_HASH ) != 0 ) {
163
162
fprintf (stderr , "FAIL: got pubkey hash '%s', want '%s'" ,
164
- hash , PUBKEY_HASH );
163
+ kp -> pubkey_hash , PUBKEY_HASH );
165
164
goto done ;
166
165
}
167
166
@@ -179,13 +178,11 @@ do_keypair_tests(void)
179
178
goto done ;
180
179
}
181
180
182
- tls_keypair_free (kp );
183
-
184
181
failed = 0 ;
185
182
186
183
done :
184
+ tls_keypair_free (kp );
187
185
X509_free (x509_cert );
188
- free (hash );
189
186
free ((uint8_t * )cert );
190
187
free ((uint8_t * )key );
191
188
free ((uint8_t * )ocsp_staple );
You can’t perform that action at this time.
0 commit comments