X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/a22bbdf6fa8e43546da6b4d7f6b0e014cb8deb6c..b92da8eb98f9e8ee5c86949c408c9f6e08a33c1e:/bbs-fetch.c diff --git a/bbs-fetch.c b/bbs-fetch.c index 87827bc..e0597a0 100644 --- a/bbs-fetch.c +++ b/bbs-fetch.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: bbs-fetch.c,v 1.1 2000/06/17 10:41:45 mdw Exp $ + * $Id: bbs-fetch.c,v 1.2 2000/07/01 11:19:22 mdw Exp $ * * Key fetching for BBS public and private keys * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: bbs-fetch.c,v $ + * Revision 1.2 2000/07/01 11:19:22 mdw + * New functions for freeing public and private keys. + * * Revision 1.1 2000/06/17 10:41:45 mdw * Table for driving key data extraction. * @@ -59,4 +62,25 @@ const key_fetchdef bbs_privfetch[] = { { 0, 0, 0, 0 } }; +/* --- @bbs_pubfree@, @bbs_privfree@ --- * + * + * Arguments: @bbs_pub *bp@, @bbs_priv *bp@ = pointer to key block + * + * Returns: --- + * + * Use: Frees an RSA key block. + */ + +void bbs_pubfree(bbs_pub *bp) +{ + mp_drop(bp->n); +} + +void bbs_privfree(bbs_priv *bp) +{ + mp_drop(bp->n); + mp_drop(bp->p); + mp_drop(bp->q); +} + /*----- That's all, folks -------------------------------------------------*/