mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
upstream commit
adapt to sshkey API tweaks
This commit is contained in:
parent
7dd355fb1f
commit
fe8a3a5169
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: test_fuzz.c,v 1.2 2015/01/18 19:53:58 djm Exp $ */
|
||||
/* $OpenBSD: test_fuzz.c,v 1.3 2015/01/26 06:11:28 djm Exp $ */
|
||||
/*
|
||||
* Fuzz tests for key parsing
|
||||
*
|
||||
@ -53,7 +53,7 @@ public_fuzz(struct sshkey *k)
|
||||
struct fuzz *fuzz;
|
||||
|
||||
ASSERT_PTR_NE(buf = sshbuf_new(), NULL);
|
||||
ASSERT_INT_EQ(sshkey_to_blob_buf(k, buf), 0);
|
||||
ASSERT_INT_EQ(sshkey_putb(k, buf), 0);
|
||||
/* XXX need a way to run the tests in "slow, but complete" mode */
|
||||
fuzz = fuzz_begin(FUZZ_1_BIT_FLIP | /* XXX too slow FUZZ_2_BIT_FLIP | */
|
||||
FUZZ_1_BYTE_FLIP | /* XXX too slow FUZZ_2_BYTE_FLIP | */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: test_sshkey.c,v 1.2 2015/01/18 19:54:46 djm Exp $ */
|
||||
/* $OpenBSD: test_sshkey.c,v 1.3 2015/01/26 06:11:28 djm Exp $ */
|
||||
/*
|
||||
* Regress test for sshkey.h key management API
|
||||
*
|
||||
@ -60,7 +60,7 @@ build_cert(struct sshbuf *b, const struct sshkey *k, const char *type,
|
||||
|
||||
ca_buf = sshbuf_new();
|
||||
ASSERT_PTR_NE(ca_buf, NULL);
|
||||
ASSERT_INT_EQ(sshkey_to_blob_buf(ca_key, ca_buf), 0);
|
||||
ASSERT_INT_EQ(sshkey_putb(ca_key, ca_buf), 0);
|
||||
|
||||
/*
|
||||
* Get the public key serialisation by rendering the key and skipping
|
||||
@ -68,7 +68,7 @@ build_cert(struct sshbuf *b, const struct sshkey *k, const char *type,
|
||||
*/
|
||||
pk = sshbuf_new();
|
||||
ASSERT_PTR_NE(pk, NULL);
|
||||
ASSERT_INT_EQ(sshkey_plain_to_blob_buf(k, pk), 0);
|
||||
ASSERT_INT_EQ(sshkey_putb_plain(k, pk), 0);
|
||||
ASSERT_INT_EQ(sshbuf_skip_string(pk), 0);
|
||||
|
||||
principals = sshbuf_new();
|
||||
@ -447,7 +447,7 @@ sshkey_tests(void)
|
||||
ASSERT_INT_EQ(sshkey_certify(k1, k2), 0);
|
||||
b = sshbuf_new();
|
||||
ASSERT_PTR_NE(b, NULL);
|
||||
ASSERT_INT_EQ(sshkey_to_blob_buf(k1, b), 0);
|
||||
ASSERT_INT_EQ(sshkey_putb(k1, b), 0);
|
||||
ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k3), 0);
|
||||
|
||||
sshkey_free(k1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user