x509_crl_ext_parse.c File Reference

CRL extension parsing. More...

#include "core/crypto.h"
#include "pkix/x509_cert_parse.h"
#include "pkix/x509_cert_ext_parse.h"
#include "pkix/x509_crl_parse.h"
#include "pkix/x509_crl_ext_parse.h"
#include "encoding/asn1.h"
#include "encoding/oid.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

error_t x509ParseCrlExtensions (const uint8_t *data, size_t length, size_t *totalLength, X509CrlExtensions *crlExtensions)
 Parse CRL extensions. More...
 
error_t x509ParseCrlNumber (bool_t critical, const uint8_t *data, size_t length, X509CrlNumber *crlNumber)
 Parse CRLNumber extension. More...
 
error_t x509ParseDeltaCrlIndicator (bool_t critical, const uint8_t *data, size_t length, X509DeltaCrlIndicator *deltaCrlIndicator)
 Parse DeltaCRLIndicator extension. More...
 
error_t x509ParseIssuingDistrPoint (bool_t critical, const uint8_t *data, size_t length, X509IssuingDistrPoint *issuingDistrPoint)
 Parse IssuingDistributionPoint extension. More...
 
error_t x509ParseCrlEntryExtensions (const uint8_t *data, size_t length, size_t *totalLength, X509CrlEntryExtensions *crlEntryExtensions)
 Parse CRL entry extensions. More...
 
error_t x509ParseReasonCode (bool_t critical, const uint8_t *data, size_t length, X509CrlReason *reasonCode)
 Parse ReasonCode entry extension. More...
 
error_t x509ParseInvalidityDate (bool_t critical, const uint8_t *data, size_t length, X509InvalidityDate *invalidityDate)
 Parse InvalidityDate entry extension. More...
 
error_t x509ParseCertificateIssuer (bool_t critical, const uint8_t *data, size_t length, X509CertificateIssuer *certificateIssuer)
 Parse CertificateIssuer entry extension. More...
 
__weak_func error_t x509ParseUnknownCrlExtension (const uint8_t *oid, size_t oidLen, bool_t critical, const uint8_t *data, size_t dataLen, X509CrlExtensions *crlExtensions)
 Parse unknown CRL extension. More...
 

Detailed Description

CRL extension parsing.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneCRYPTO Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file x509_crl_ext_parse.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file x509_crl_ext_parse.c.

Function Documentation

◆ x509ParseCertificateIssuer()

error_t x509ParseCertificateIssuer ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509CertificateIssuer certificateIssuer 
)

Parse CertificateIssuer entry extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]certificateIssuerInformation resulting from the parsing process
Returns
Error code

Definition at line 577 of file x509_crl_ext_parse.c.

◆ x509ParseCrlEntryExtensions()

error_t x509ParseCrlEntryExtensions ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509CrlEntryExtensions crlEntryExtensions 
)

Parse CRL entry extensions.

Parameters
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]totalLengthNumber of bytes that have been parsed
[out]crlEntryExtensionsInformation resulting from the parsing process
Returns
Error code

Definition at line 391 of file x509_crl_ext_parse.c.

◆ x509ParseCrlExtensions()

error_t x509ParseCrlExtensions ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509CrlExtensions crlExtensions 
)

Parse CRL extensions.

Parameters
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]totalLengthNumber of bytes that have been parsed
[out]crlExtensionsInformation resulting from the parsing process
Returns
Error code

Definition at line 57 of file x509_crl_ext_parse.c.

◆ x509ParseCrlNumber()

error_t x509ParseCrlNumber ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509CrlNumber crlNumber 
)

Parse CRLNumber extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]crlNumberInformation resulting from the parsing process
Returns
Error code

Definition at line 199 of file x509_crl_ext_parse.c.

◆ x509ParseDeltaCrlIndicator()

error_t x509ParseDeltaCrlIndicator ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509DeltaCrlIndicator deltaCrlIndicator 
)

Parse DeltaCRLIndicator extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]deltaCrlIndicatorInformation resulting from the parsing process
Returns
Error code

Definition at line 241 of file x509_crl_ext_parse.c.

◆ x509ParseInvalidityDate()

error_t x509ParseInvalidityDate ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509InvalidityDate invalidityDate 
)

Parse InvalidityDate entry extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]invalidityDateInformation resulting from the parsing process
Returns
Error code

Definition at line 548 of file x509_crl_ext_parse.c.

◆ x509ParseIssuingDistrPoint()

error_t x509ParseIssuingDistrPoint ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509IssuingDistrPoint issuingDistrPoint 
)

Parse IssuingDistributionPoint extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]issuingDistrPointInformation resulting from the parsing process
Returns
Error code

Definition at line 283 of file x509_crl_ext_parse.c.

◆ x509ParseReasonCode()

error_t x509ParseReasonCode ( bool_t  critical,
const uint8_t *  data,
size_t  length,
X509CrlReason reasonCode 
)

Parse ReasonCode entry extension.

Parameters
[in]criticalCritical extension flag
[in]dataPointer to the ASN.1 structure to parse
[in]lengthLength of the ASN.1 structure
[out]reasonCodeInformation resulting from the parsing process
Returns
Error code

Definition at line 501 of file x509_crl_ext_parse.c.

◆ x509ParseUnknownCrlExtension()

__weak_func error_t x509ParseUnknownCrlExtension ( const uint8_t *  oid,
size_t  oidLen,
bool_t  critical,
const uint8_t *  data,
size_t  dataLen,
X509CrlExtensions crlExtensions 
)

Parse unknown CRL extension.

Parameters
[in]oidExtension identifier
[in]oidLenLength of the extension identifier
[in]criticalCritical extension flag
[in]dataExtension value
[in]dataLenLength of the extension value
[out]crlExtensionsInformation resulting from the parsing process
Returns
Error code

Definition at line 652 of file x509_crl_ext_parse.c.