summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h
blob: 1d05a9447e11c78d970d36e0b2935e2c94f79df0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
 * pkix_pl_ldaprequest.h
 *
 * LdapRequest Object Definitions
 *
 */

#ifndef _PKIX_PL_LDAPREQUEST_H
#define _PKIX_PL_LDAPREQUEST_H

#include "pkix_pl_common.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
        USER_CERT,
        CA_CERT,
        CROSS_CERT,
        CRL,
        ARL,
        DELTA_CRL
} PKIX_PL_LdapAttr;

struct PKIX_PL_LdapRequestStruct{
        PLArenaPool *arena;
        PKIX_UInt32 msgnum;
        char *issuerDN;
        ScopeType scope;
        DerefType derefAliases;
        PKIX_UInt32 sizeLimit;
        PKIX_UInt32 timeLimit;
        char attrsOnly;
        LDAPFilter *filter;
        LdapAttrMask attrBits;
        SECItem attributes[MAX_LDAPATTRS];
        SECItem **attrArray;
        SECItem *encoded;
};

/* see source file for function documentation */

PKIX_Error *
pkix_pl_LdapRequest_Create(
        PLArenaPool *arena,
        PKIX_UInt32 msgnum,
        char *issuerDN,
        ScopeType scope,
        DerefType derefAliases,
        PKIX_UInt32 sizeLimit,
        PKIX_UInt32 timeLimit,
        char attrsOnly,
        LDAPFilter *filter,
        LdapAttrMask attrBits,
        PKIX_PL_LdapRequest **pRequestMsg,
        void *plContext);

PKIX_Error *
pkix_pl_LdapRequest_AttrTypeToBit(
        SECItem *attrType,
        LdapAttrMask *pAttrBit,
        void *plContext);

PKIX_Error *
pkix_pl_LdapRequest_AttrStringToBit(
        char *attrString,
        LdapAttrMask *pAttrBit,
        void *plContext);

PKIX_Error *
pkix_pl_LdapRequest_GetEncoded(
        PKIX_PL_LdapRequest *request,
        SECItem **pRequestBuf,
        void *plContext);

PKIX_Error *pkix_pl_LdapRequest_RegisterSelf(void *plContext);

#ifdef __cplusplus
}
#endif

#endif /* _PKIX_PL_LDAPREQUEST_H */