Blame


1 50b0790e 2020-09-11 stsp /*
2 50b0790e 2020-09-11 stsp * Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
3 50b0790e 2020-09-11 stsp *
4 50b0790e 2020-09-11 stsp * Permission to use, copy, modify, and distribute this software for any
5 50b0790e 2020-09-11 stsp * purpose with or without fee is hereby granted, provided that the above
6 50b0790e 2020-09-11 stsp * copyright notice and this permission notice appear in all copies.
7 50b0790e 2020-09-11 stsp *
8 50b0790e 2020-09-11 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 50b0790e 2020-09-11 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 50b0790e 2020-09-11 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 50b0790e 2020-09-11 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 50b0790e 2020-09-11 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 50b0790e 2020-09-11 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 50b0790e 2020-09-11 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 50b0790e 2020-09-11 stsp */
16 50b0790e 2020-09-11 stsp
17 50b0790e 2020-09-11 stsp struct got_gotconfig;
18 50b0790e 2020-09-11 stsp
19 50b0790e 2020-09-11 stsp /*
20 50b0790e 2020-09-11 stsp * Obtain the commit author parsed from got.conf.
21 50b0790e 2020-09-11 stsp * Return NULL if no configuration file or author could be found.
22 50b0790e 2020-09-11 stsp */
23 50b0790e 2020-09-11 stsp const char *got_gotconfig_get_author(const struct got_gotconfig *);
24 50b0790e 2020-09-11 stsp
25 50b0790e 2020-09-11 stsp /*
26 50b0790e 2020-09-11 stsp * Obtain the list of remote repositories parsed from got.conf.
27 50b0790e 2020-09-11 stsp * Return 0 and NULL if no configuration file or remote repository
28 50b0790e 2020-09-11 stsp * could be found.
29 50b0790e 2020-09-11 stsp */
30 50b0790e 2020-09-11 stsp void got_gotconfig_get_remotes(int *, const struct got_remote_repo **,
31 50b0790e 2020-09-11 stsp const struct got_gotconfig *);
32 4d5ee956 2022-07-02 jrick
33 4d5ee956 2022-07-02 jrick /*
34 4d5ee956 2022-07-02 jrick * Obtain the filename of the allowed signers file.
35 4d5ee956 2022-07-02 jrick * Returns NULL if no configuration file is found or no allowed signers file
36 4d5ee956 2022-07-02 jrick * is configured.
37 4d5ee956 2022-07-02 jrick */
38 4d5ee956 2022-07-02 jrick const char *
39 4d5ee956 2022-07-02 jrick got_gotconfig_get_allowed_signers_file(const struct got_gotconfig *);
40 4d5ee956 2022-07-02 jrick
41 4d5ee956 2022-07-02 jrick /*
42 4d5ee956 2022-07-02 jrick * Obtain the filename of the revoked signers file.
43 4d5ee956 2022-07-02 jrick * Returns NULL if no configuration file is found or no revoked signers file
44 4d5ee956 2022-07-02 jrick * is configured.
45 4d5ee956 2022-07-02 jrick */
46 4d5ee956 2022-07-02 jrick const char *
47 4d5ee956 2022-07-02 jrick got_gotconfig_get_revoked_signers_file(const struct got_gotconfig *);
48 d68f2c0e 2022-07-05 jrick
49 d68f2c0e 2022-07-05 jrick /*
50 d68f2c0e 2022-07-05 jrick * Obtain the signer identity used to sign tag objects
51 d68f2c0e 2022-07-05 jrick * Returns NULL if no configuration file is found or no revoked signers file
52 d68f2c0e 2022-07-05 jrick * is configured.
53 d68f2c0e 2022-07-05 jrick */
54 d68f2c0e 2022-07-05 jrick const char *
55 d68f2c0e 2022-07-05 jrick got_gotconfig_get_signer_id(const struct got_gotconfig *);