diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-09-13 09:03:20 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-09-13 19:04:10 +1000 |
commit | a3fd8074e2e2f06602e25618721f9556c731312c (patch) | |
tree | 133f60fc47fe37700c5fd6fbdfbfaf6fbe6a4715 /regress/unittests/sshkey/test_sshkey.c | |
parent | 86e0a9f3d249d5580390daf58e015e68b01cef10 (diff) |
upstream: missed a bit of openssl-1.0.x API in this unittest
OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9
Diffstat (limited to 'regress/unittests/sshkey/test_sshkey.c')
-rw-r--r-- | regress/unittests/sshkey/test_sshkey.c | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c index 8e35f4417..47a03fad4 100644 --- a/regress/unittests/sshkey/test_sshkey.c +++ b/regress/unittests/sshkey/test_sshkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: test_sshkey.c,v 1.16 2018/09/13 05:06:51 djm Exp $ */ | 1 | /* $OpenBSD: test_sshkey.c,v 1.17 2018/09/13 09:03:20 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Regress test for sshkey.h key management API | 3 | * Regress test for sshkey.h key management API |
4 | * | 4 | * |
@@ -173,61 +173,6 @@ get_private(const char *n) | |||
173 | return ret; | 173 | return ret; |
174 | } | 174 | } |
175 | 175 | ||
176 | static const BIGNUM * | ||
177 | rsa_n(struct sshkey *k) | ||
178 | { | ||
179 | const BIGNUM *n = NULL; | ||
180 | |||
181 | ASSERT_PTR_NE(k, NULL); | ||
182 | ASSERT_PTR_NE(k->rsa, NULL); | ||
183 | RSA_get0_key(k->rsa, &n, NULL, NULL); | ||
184 | return n; | ||
185 | } | ||
186 | |||
187 | static const BIGNUM * | ||
188 | rsa_e(struct sshkey *k) | ||
189 | { | ||
190 | const BIGNUM *e = NULL; | ||
191 | |||
192 | ASSERT_PTR_NE(k, NULL); | ||
193 | ASSERT_PTR_NE(k->rsa, NULL); | ||
194 | RSA_get0_key(k->rsa, NULL, &e, NULL); | ||
195 | return e; | ||
196 | } | ||
197 | |||
198 | static const BIGNUM * | ||
199 | rsa_p(struct sshkey *k) | ||
200 | { | ||
201 | const BIGNUM *p = NULL; | ||
202 | |||
203 | ASSERT_PTR_NE(k, NULL); | ||
204 | ASSERT_PTR_NE(k->rsa, NULL); | ||
205 | RSA_get0_factors(k->rsa, &p, NULL); | ||
206 | return p; | ||
207 | } | ||
208 | |||
209 | static const BIGNUM * | ||
210 | dsa_g(struct sshkey *k) | ||
211 | { | ||
212 | const BIGNUM *g = NULL; | ||
213 | |||
214 | ASSERT_PTR_NE(k, NULL); | ||
215 | ASSERT_PTR_NE(k->dsa, NULL); | ||
216 | DSA_get0_pqg(k->dsa, NULL, NULL, &g); | ||
217 | return g; | ||
218 | } | ||
219 | |||
220 | static const BIGNUM * | ||
221 | dsa_priv_key(struct sshkey *k) | ||
222 | { | ||
223 | const BIGNUM *priv_key = NULL; | ||
224 | |||
225 | ASSERT_PTR_NE(k, NULL); | ||
226 | ASSERT_PTR_NE(k->dsa, NULL); | ||
227 | DSA_get0_key(k->dsa, NULL, &priv_key); | ||
228 | return priv_key; | ||
229 | } | ||
230 | |||
231 | void | 176 | void |
232 | sshkey_tests(void) | 177 | sshkey_tests(void) |
233 | { | 178 | { |