Debian Codegraph @

runtime/libcry_common.h

raw
1 /* libgcry.h - rsyslog's guardtime support library
2 *
3 * Copyright 2013 Adiscon GmbH.
4 *
5 * This file is part of rsyslog.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 * -or-
13 * see COPYING.ASL20 in the source distribution
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21 #ifndef INCLUDED_LIBCRY_COMMON_H
22 #define INCLUDED_LIBCRY_COMMON_H
23 #include <stdint.h>
24
25 /* error states */
26 #define RSGCRYE_EI_OPEN 1 /* error opening .encinfo file */
27 #define RSGCRYE_OOM 4 /* ran out of memory */
28
29 #define EIF_MAX_RECTYPE_LEN 31 /* max length of record types */
30 #define EIF_MAX_VALUE_LEN 1023 /* max length of value types */
31 #define RSGCRY_FILETYPE_NAME "rsyslog-enrcyption-info"
32 #define ENCINFO_SUFFIX ".encinfo"
33
34 int cryGetKeyFromFile(const char* const fn, char** const key, unsigned* const keylen);
35
36 int cryGetKeyFromProg(char* cmd, char** key, unsigned* keylen);
37
38 #endif