common.h 698 B

1234567891011121314151617181920212223242526
  1. /* $OpenBSD: common.h,v 1.2 2018/09/13 09:03:20 djm Exp $ */
  2. /*
  3. * Helpers for key API tests
  4. *
  5. * Placed in the public domain
  6. */
  7. /* Load a binary file into a buffer */
  8. struct sshbuf *load_file(const char *name);
  9. /* Load a text file into a buffer */
  10. struct sshbuf *load_text_file(const char *name);
  11. /* Load a bignum from a file */
  12. BIGNUM *load_bignum(const char *name);
  13. /* Accessors for key components */
  14. const BIGNUM *rsa_n(struct sshkey *k);
  15. const BIGNUM *rsa_e(struct sshkey *k);
  16. const BIGNUM *rsa_p(struct sshkey *k);
  17. const BIGNUM *rsa_q(struct sshkey *k);
  18. const BIGNUM *dsa_g(struct sshkey *k);
  19. const BIGNUM *dsa_pub_key(struct sshkey *k);
  20. const BIGNUM *dsa_priv_key(struct sshkey *k);