summaryrefslogtreecommitdiffstats
path: root/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h
blob: 49cd9d2cdf6a3f847f0e7f555e0be5d5a8f98519 (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
/* 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_crldp.h
 *
 * Crp DP Object Definitions
 *
 */
#include "pkix_pl_common.h"

#ifndef _PKIX_PL_CRLDP_H
#define _PKIX_PL_CRLDP_H

#ifdef __cplusplus
extern "C" {
#endif

/* CRLDP object can not be used without holding a reference
 * to the pkix certificate they belong to. The memory for dp der
 * object is allocated on nssCert certificate - a member of
 * PKIX_PL_Cert struct. */
typedef struct pkix_pl_CrlDpStruct {
    /* reference to decoded crldp that allocated on nssCert arena. */
    const CRLDistributionPoint *nssdp;
    DistributionPointTypes distPointType;
    union {
	CERTGeneralName *fullName;
        /* if dp is a relative name, the issuerName is a merged value
         * of crlIssuer and a relative name. Must be destroyed by CrlDp
         * destructor. */
        CERTName *issuerName;
    } name;
    PKIX_Boolean isPartitionedByReasonCode;
} pkix_pl_CrlDp;


PKIX_Error *
pkix_pl_CrlDp_RegisterSelf(void *plContext);

/* Parses CRLDistributionPoint structure and creaetes
 * pkix_pl_CrlDp object. */
PKIX_Error *
pkix_pl_CrlDp_Create(const CRLDistributionPoint *dp,
                     const CERTName *certIssuerName,
                     pkix_pl_CrlDp **pPkixDP,
                     void *plContext);

#ifdef __cplusplus
}
#endif

#endif /* _PKIX_PL_CRLDP_H */