General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / bbs-fetch.c
index 87827bc..20eee08 100644 (file)
@@ -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.3 2004/04/08 01:36:15 mdw Exp $
  *
  * Key fetching for BBS public and private keys
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: bbs-fetch.c,v $
- * Revision 1.1  2000/06/17 10:41:45  mdw
- * Table for driving key data extraction.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include "bbs.h"
@@ -59,4 +51,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 -------------------------------------------------*/