Back to index

lightning-sunbird  0.9+nobinonly
Functions
crlv2.c File Reference
#include "cert.h"
#include "secitem.h"
#include "secoid.h"
#include "secoidt.h"
#include "secder.h"
#include "secasn1.h"
#include "certxutl.h"

Go to the source code of this file.

Functions

SECStatus CERT_FindCRLExtensionByOID (CERTCrl *crl, SECItem *oid, SECItem *value)
SECStatus CERT_FindCRLExtension (CERTCrl *crl, int tag, SECItem *value)
static void SetCrlExts (void *object, CERTCertExtension **exts)
voidCERT_StartCRLExtensions (CERTCrl *crl)
static void SetCrlEntryExts (void *object, CERTCertExtension **exts)
voidCERT_StartCRLEntryExtensions (CERTCrl *crl, CERTCrlEntry *entry)
SECStatus CERT_FindCRLNumberExten (CERTCrl *crl, CERTCrlNumber *value)
SECStatus CERT_FindCRLReasonExten (CERTCrl *crl, SECItem *value)
SECStatus CERT_FindInvalidDateExten (CERTCrl *crl, int64 *value)

Function Documentation

SECStatus CERT_FindCRLExtension ( CERTCrl *  crl,
int  tag,
SECItem *  value 
)

Definition at line 59 of file crlv2.c.

{
    return (cert_FindExtension (crl->extensions, tag, value));
}
SECStatus CERT_FindCRLExtensionByOID ( CERTCrl *  crl,
SECItem *  oid,
SECItem *  value 
)

Definition at line 52 of file crlv2.c.

{
    return (cert_FindExtensionByOID (crl->extensions, oid, value));
}
SECStatus CERT_FindCRLNumberExten ( CERTCrl *  crl,
CERTCrlNumber value 
)

Definition at line 95 of file crlv2.c.

{
    SECItem encodedExtenValue;
    SECStatus rv;

    encodedExtenValue.data = NULL;
    encodedExtenValue.len = 0;

    rv = cert_FindExtension
        (crl->extensions, SEC_OID_X509_CRL_NUMBER, &encodedExtenValue);
    if ( rv != SECSuccess )
       return (rv);

    rv = SEC_ASN1DecodeItem (NULL, value, SEC_IntegerTemplate,
                          &encodedExtenValue);
    PORT_Free (encodedExtenValue.data);
    return (rv);
}
SECStatus CERT_FindCRLReasonExten ( CERTCrl *  crl,
SECItem *  value 
)

Definition at line 114 of file crlv2.c.

Here is the call graph for this function:

SECStatus CERT_FindInvalidDateExten ( CERTCrl *  crl,
int64 value 
)

Definition at line 120 of file crlv2.c.

{
    SECItem encodedExtenValue;
    SECItem decodedExtenValue = {siBuffer,0};
    SECStatus rv;

    encodedExtenValue.data = decodedExtenValue.data = NULL;
    encodedExtenValue.len = decodedExtenValue.len = 0;

    rv = cert_FindExtension
        (crl->extensions, SEC_OID_X509_INVALID_DATE, &encodedExtenValue);
    if ( rv != SECSuccess )
       return (rv);

    rv = SEC_ASN1DecodeItem (NULL, &decodedExtenValue,
                          SEC_GeneralizedTimeTemplate, &encodedExtenValue);
    if (rv == SECSuccess)
       rv = DER_GeneralizedTimeToTime(value, &encodedExtenValue);
    PORT_Free (decodedExtenValue.data);
    PORT_Free (encodedExtenValue.data);
    return (rv);
}
void* CERT_StartCRLEntryExtensions ( CERTCrl *  crl,
CERTCrlEntry *  entry 
)

Definition at line 90 of file crlv2.c.

{
    return (cert_StartExtensions (entry, crl->arena, SetCrlEntryExts));
}
void* CERT_StartCRLExtensions ( CERTCrl *  crl)

Definition at line 76 of file crlv2.c.

{
    return (cert_StartExtensions ((void *)crl, crl->arena, SetCrlExts));
}
static void SetCrlEntryExts ( void object,
CERTCertExtension **  exts 
) [static]

Definition at line 82 of file crlv2.c.

{
    CERTCrlEntry *crlEntry = (CERTCrlEntry *)object;

    crlEntry->extensions = exts;
}

Here is the caller graph for this function:

static void SetCrlExts ( void object,
CERTCertExtension **  exts 
) [static]

Definition at line 67 of file crlv2.c.

{
    CERTCrl *crl = (CERTCrl *)object;

    crl->extensions = exts;
    DER_SetUInteger (crl->arena, &crl->version, SEC_CRL_VERSION_2);
}

Here is the call graph for this function:

Here is the caller graph for this function: