cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
certstore.h
Go to the documentation of this file.
1 /****************************************************************************
2 * *
3 * cryptlib Certstore Session Management *
4 * Copyright Peter Gutmann 1998-2008 *
5 * *
6 ****************************************************************************/
7 
8 #ifndef _CERTSTORE_DEFINED
9 
10 #define _CERTSTORE_DEFINED
11 
12 /* The certstore HTTP content type */
13 
14 #define CERTSTORE_CONTENT_TYPE "application/pkix-cert"
15 #define CERTSTORE_CONTENT_TYPE_LEN 21
16 
17 /* Processing flags for certstore query data. These are:
18 
19  FLAG_BASE64: The attribute is base64-encoded and must be decoded before
20  being returned to the caller */
21 
22 #define CERTSTORE_FLAG_NONE 0x00 /* No special processing */
23 #define CERTSTORE_FLAG_BASE64 0x01 /* Data must be base64 */
24 
25 /* A mapping of a query submitted as an HTTP GET to a cryptlib-specific
26  attribute ID that can be used for an operation like a keyset query. Note
27  that the first letter must be lowercase for the case-insensitive quick
28  match */
29 
30 typedef struct {
31  BUFFER_FIXED( attrNameLen ) \
32  const char *attrName; /* Attribute name from HTTP GET */
33  const int attrNameLen; /* Attribute name length */
34  const int attrID; /* Attribute ID */
35  const int flags; /* Processing flags */
37 
38 /* Prototypes for functions in certstore.c */
39 
40 CHECK_RETVAL STDC_NONNULL_ARG( ( 1, 2, 3, 5 ) ) \
41 int processCertQuery( INOUT SESSION_INFO *sessionInfoPtr,
43  IN_ARRAY( queryReqInfoSize ) \
44  const CERTSTORE_READ_INFO *queryReqInfo,
45  IN_RANGE( 1, 64 ) const int queryReqInfoSize,
48  void *attribute,
51 STDC_NONNULL_ARG( ( 1 ) ) \
52 void sendCertErrorResponse( INOUT SESSION_INFO *sessionInfoPtr,
53  IN_ERROR const int errorStatus );
54 
55 #endif /* _CERTSTORE_DEFINED */