1 /*
2  * Authentication certificate definitions for the CUPS scheduler.
3  *
4  * Copyright 2007-2012 by Apple Inc.
5  * Copyright 1997-2005 by Easy Software Products.
6  *
7  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
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 */
20   int		type;			/* AuthType for username */
21 } cupsd_cert_t;
22 
23 
24 /*
25  * Globals...
26  */
27 
28 VAR cupsd_cert_t	*Certs		/* List of certificates */
29 				VALUE(NULL);
30 VAR time_t		RootCertTime	/* Root certificate update time */
31 				VALUE(0);
32 
33 
34 /*
35  * Prototypes...
36  */
37 
38 extern void		cupsdAddCert(int pid, const char *username, int type);
39 extern void		cupsdDeleteCert(int pid);
40 extern void		cupsdDeleteAllCerts(void);
41 extern cupsd_cert_t	*cupsdFindCert(const char *certificate);
42 extern void		cupsdInitCerts(void);
43