openssh/regress/unittests/sshkey/common.h
djm@openbsd.org a3fd8074e2 upstream: missed a bit of openssl-1.0.x API in this unittest
OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9
2018-09-13 19:04:10 +10:00

26 lines
698 B
C

/* $OpenBSD: common.h,v 1.2 2018/09/13 09:03:20 djm Exp $ */
/*
* Helpers for key API tests
*
* Placed in the public domain
*/
/* Load a binary file into a buffer */
struct sshbuf *load_file(const char *name);
/* Load a text file into a buffer */
struct sshbuf *load_text_file(const char *name);
/* Load a bignum from a file */
BIGNUM *load_bignum(const char *name);
/* Accessors for key components */
const BIGNUM *rsa_n(struct sshkey *k);
const BIGNUM *rsa_e(struct sshkey *k);
const BIGNUM *rsa_p(struct sshkey *k);
const BIGNUM *rsa_q(struct sshkey *k);
const BIGNUM *dsa_g(struct sshkey *k);
const BIGNUM *dsa_pub_key(struct sshkey *k);
const BIGNUM *dsa_priv_key(struct sshkey *k);