]> the.earth.li Git - onak.git/blob - photoid.h
Fix compilation with later versions of Nettle
[onak.git] / photoid.h
1 /*
2  * photoid.h - Routines for OpenPGP id photos.
3  *
4  * Copyright 2004 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __PHOTOID_H__
20 #define __PHOTOID_H__
21
22 #include "keystructs.h"
23
24 /**
25  *      getphoto - returns an OpenPGP packet containing a photo id.
26  *      @key: The key to return the photo id from.
27  *      @index: The index of the photo to return.
28  *      @photo: The photo data.
29  *      @length: The length of the photo data.
30  *
31  *      This function returns the photo data contained in a supplied key.
32  *      index specifies which photo id should be returned. If there's no such
33  *      photo id NULL is returned. The returned data pointer refers to the key
34  *      data supplied rather than a copy of it.
35  */
36 onak_status_t getphoto(struct openpgp_publickey *key, int index,
37                 unsigned char **photo, size_t *length);
38
39 #endif /* __PHOTOID_H__ */