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