]> andersk Git - moira.git/blame - util/gdss/include/gdss.h
Remove incorrect krb_get_lrealm() prototype.
[moira.git] / util / gdss / include / gdss.h
CommitLineData
0095f096 1/*
2 * Include file for GDSS The Generic Digital Signature Service.
3 *
4 */
f2538e2f 5
6#include <krb.h>
0095f096 7
8/* Structures Needed */
9
10typedef struct {
11 int SigInfoVersion;
12 char pname[ANAME_SZ];
13 char pinst[INST_SZ];
14 char prealm[REALM_SZ];
15 unsigned int timestamp;
16 unsigned char *rawsig; /* Raw Signature Bytes */
17} SigInfo;
18
19/* GDSS Errors */
20
21#define GDSS_SUCCESS 0 /* No error */
22#define GDSS_E_BADSIG -1 /* Signature failed to verify */
23#define GDSS_E_NOPUBKEY -2 /* Couldn't find public key file */
24#define GDSS_E_KRBFAIL -3 /* Generic Kerberos error during sign */
25#define GDSS_E_NOSOCKET -4 /* socket() call failed during sign */
26#define GDSS_E_NOCONNECT -5 /* connect() call failed during sign */
27#define GDSS_E_TIMEDOUT -6 /* timed out contacting gdss sign server */
28#define GDSS_E_PADTOOMANY -7 /* Padding required to much space */
29#define GDSS_E_ALLOC -8 /* malloc() failed to allocate memory */
30#define GDSS_E_BVERSION -9 /* Bad version ID in signature */
31#define GDSS_E_BADINPUT -10 /* Bad input value to Recompose */
32
33/* GDSS Constants */
34
35#define GDSS_PAD 10 /* Maximum number of nulls to pad */
36#define GDSS_ESCAPE 0x20 /* Escape character for padding */
37#define GDSS_NULL 0x21 /* Psuedo Null character */
f2538e2f 38
39/* GDSS Prototypes */
40int GDSS_Verify(unsigned char *Data, unsigned int DataLen,
41 unsigned char *Signature, SigInfo *aSigInfo);
42int GDSS_Sig_Size(void);
43int GDSS_Recompose(SigInfo *aSigInfo, unsigned char *signature);
44int GDSS_Sign(unsigned char *Data, unsigned int DataLen,
45 unsigned char *Signature);
This page took 0.664455 seconds and 5 git commands to generate.