X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keyindex.h;h=961121e973d81d3b527745531eb4d3a22c796cc8;hb=refs%2Fheads%2Fmain;hp=c9a584328cb0b43ea24a79a80bc687947832890b;hpb=5e1b22d763640c4d7a09d07920403d8d491b4410;p=onak.git diff --git a/keyindex.h b/keyindex.h index c9a5843..961121e 100644 --- a/keyindex.h +++ b/keyindex.h @@ -13,8 +13,7 @@ * more details. * * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * this program. If not, see . */ #ifndef __KEYINDEX_H__ @@ -22,6 +21,7 @@ #include +#include "keydb.h" #include "keystructs.h" /** @@ -35,7 +35,8 @@ * This function takes a list of OpenPGP public keys and displays an index * of them. Useful for debugging or the keyserver Index function. */ -int key_index(struct openpgp_publickey *keys, bool verbose, +int key_index(struct onak_dbctx *dbctx, + struct openpgp_publickey *keys, bool verbose, bool fingerprint, bool skshash, bool html); /** @@ -46,4 +47,17 @@ int key_index(struct openpgp_publickey *keys, bool verbose, * machine readable list of them. */ int mrkey_index(struct openpgp_publickey *keys); + +/** + * html_escape - Takes a string and converts it to HTML. + * @src: The string to HTMLize. + * @src_len: The length of the source string + * @dst: A buffer to put the escaped string into + * @dst_len: Length of the destination buffer (including a trailing NULL) + * + * Takes a string and escapes any HTML entities (<, >, &, ", '). Returns + * dst. + */ +const char *html_escape(const char *src, size_t src_len, + char *dst, size_t dst_len); #endif