]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
503b54c9 | 2 | * Authentication certificate definitions for the CUPS scheduler. |
ef416fc2 | 3 | * |
503b54c9 MS |
4 | * Copyright 2007-2012 by Apple Inc. |
5 | * Copyright 1997-2005 by Easy Software Products. | |
ef416fc2 | 6 | * |
e3101897 | 7 | * Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ef416fc2 | 8 | */ |
9 | ||
10 | /* | |
11 | * Certificate structure... | |
12 | */ | |
13 | ||
14 | typedef struct cupsd_cert_s | |
15 | { | |
16 | struct cupsd_cert_s *next; /* Next certificate in list */ | |
17 | int pid; /* Process ID (0 for root certificate) */ | |
18 | char certificate[33]; /* 32 hex characters, or 128 bits */ | |
19 | char username[33]; /* Authenticated username */ | |
0fa6c7fa | 20 | int type; /* AuthType for username */ |
ef416fc2 | 21 | } cupsd_cert_t; |
22 | ||
23 | ||
24 | /* | |
25 | * Globals... | |
26 | */ | |
27 | ||
ac884b6a MS |
28 | VAR cupsd_cert_t *Certs /* List of certificates */ |
29 | VALUE(NULL); | |
30 | VAR time_t RootCertTime /* Root certificate update time */ | |
31 | VALUE(0); | |
ef416fc2 | 32 | |
33 | ||
34 | /* | |
35 | * Prototypes... | |
36 | */ | |
37 | ||
0fa6c7fa | 38 | extern void cupsdAddCert(int pid, const char *username, int type); |
ef416fc2 | 39 | extern void cupsdDeleteCert(int pid); |
40 | extern void cupsdDeleteAllCerts(void); | |
db0bd74a | 41 | extern cupsd_cert_t *cupsdFindCert(const char *certificate); |
ef416fc2 | 42 | extern void cupsdInitCerts(void); |