X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=parsekey.h;h=c237aa95d19b1ef39a26ecafa036dcbe8f13337f;hp=7e2e2bdfd3f5f535681747190e22598a73f0dc46;hb=76f079e5ebdb34acaaa2462a8d915ee06d3c8425;hpb=58d762ea573eb3cfea626bb52ea7a99e24b8a0aa diff --git a/parsekey.h b/parsekey.h index 7e2e2bd..c237aa9 100644 --- a/parsekey.h +++ b/parsekey.h @@ -1,17 +1,26 @@ /* * parsekey.h - Routines to parse an OpenPGP key. * - * Jonathan McDowell + * Copyright 2002-2004,2007-2008,2011 Jonathan McDowell * - * Copyright 2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. * - * $Id: parsekey.h,v 1.6 2003/10/04 10:21:40 noodles Exp $ + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef __PARSEKEY_H__ #define __PARSEKEY_H__ #include "keystructs.h" +#include "onak.h" /** * parse_keys - Process a stream of packets for public keys + sigs. @@ -50,8 +59,8 @@ int debug_packet(struct openpgp_packet *packet); * then only the public key component of the last key will be returned, * none of the other packets of the key will be read. */ -int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count, - unsigned char *c), +onak_status_t read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count, + void *c), void *ctx, struct openpgp_packet_list **packets, int maxnum); @@ -65,8 +74,8 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count, * This function uses putchar_func to write characters to an OpenPGP * packet stream from a linked list of packets. */ -int write_openpgp_stream(int (*putchar_func)(void *ctx, size_t count, - unsigned char *c), +onak_status_t write_openpgp_stream(int (*putchar_func)(void *ctx, size_t count, + void *c), void *ctx, struct openpgp_packet_list *packets);