summaryrefslogtreecommitdiff
path: root/regress/unittests/sshkey/test_file.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
committerColin Watson <cjwatson@debian.org>2019-10-09 23:39:39 +0100
commit767ee84d3465b6d244a9108de5c167a9ab866df9 (patch)
tree69b14ef6a62d7f133298a21d2ad6046f130b7801 /regress/unittests/sshkey/test_file.c
parentddeaf9ee7d5c6612b88f1c4a83fc6fbccb93bf60 (diff)
parentefef12825b9582c1710da3b7e50135870963d4f4 (diff)
New upstream release (8.1p1)
Diffstat (limited to 'regress/unittests/sshkey/test_file.c')
-rw-r--r--regress/unittests/sshkey/test_file.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
index 65610dacc..55627bc12 100644
--- a/regress/unittests/sshkey/test_file.c
+++ b/regress/unittests/sshkey/test_file.c
@@ -19,13 +19,15 @@
19#include <string.h> 19#include <string.h>
20#include <unistd.h> 20#include <unistd.h>
21 21
22#ifdef WITH_OPENSSL
22#include <openssl/bn.h> 23#include <openssl/bn.h>
23#include <openssl/rsa.h> 24#include <openssl/rsa.h>
24#include <openssl/dsa.h> 25#include <openssl/dsa.h>
25#include <openssl/objects.h> 26#include <openssl/objects.h>
26#ifdef OPENSSL_HAS_NISTP256 27#ifdef OPENSSL_HAS_NISTP256
27# include <openssl/ec.h> 28# include <openssl/ec.h>
28#endif 29#endif /* OPENSSL_HAS_NISTP256 */
30#endif /* WITH_OPENSSL */
29 31
30#include "../test_helper/test_helper.h" 32#include "../test_helper/test_helper.h"
31 33
@@ -44,7 +46,9 @@ sshkey_file_tests(void)
44{ 46{
45 struct sshkey *k1, *k2; 47 struct sshkey *k1, *k2;
46 struct sshbuf *buf, *pw; 48 struct sshbuf *buf, *pw;
49#ifdef WITH_OPENSSL
47 BIGNUM *a, *b, *c; 50 BIGNUM *a, *b, *c;
51#endif
48 char *cp; 52 char *cp;
49 53
50 TEST_START("load passphrase"); 54 TEST_START("load passphrase");
@@ -52,6 +56,7 @@ sshkey_file_tests(void)
52 TEST_DONE(); 56 TEST_DONE();
53 57
54 58
59#ifdef WITH_OPENSSL
55 TEST_START("parse RSA from private"); 60 TEST_START("parse RSA from private");
56 buf = load_file("rsa_1"); 61 buf = load_file("rsa_1");
57 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); 62 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
@@ -350,6 +355,7 @@ sshkey_file_tests(void)
350 355
351 sshkey_free(k1); 356 sshkey_free(k1);
352#endif /* OPENSSL_HAS_ECC */ 357#endif /* OPENSSL_HAS_ECC */
358#endif /* WITH_OPENSSL */
353 359
354 TEST_START("parse Ed25519 from private"); 360 TEST_START("parse Ed25519 from private");
355 buf = load_file("ed25519_1"); 361 buf = load_file("ed25519_1");