x509_crl_parse.c File Reference

CRL (Certificate Revocation List) More...

#include "core/crypto.h"
#include "pkix/x509_cert_parse.h"
#include "pkix/x509_crl_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 x509ParseCrl (const uint8_t *data, size_t length, X509CrlInfo *crlInfo)
 Parse a CRL (Certificate Revocation List) More...
 
error_t x509ParseTbsCertList (const uint8_t *data, size_t length, size_t *totalLength, X509TbsCertList *tbsCertList)
 Parse TBSCertList structure. More...
 
error_t x509ParseCrlVersion (const uint8_t *data, size_t length, size_t *totalLength, X509Version *version)
 Parse Version field. More...
 
error_t x509ParseRevokedCertificates (const uint8_t *data, size_t length, size_t *totalLength, X509TbsCertList *tbsCertList)
 Parse RevokedCertificates field. More...
 
error_t x509ParseRevokedCertificate (const uint8_t *data, size_t length, size_t *totalLength, X509RevokedCertificate *revokedCertificate)
 Parse RevokedCertificate field. More...
 
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...
 

Detailed Description

CRL (Certificate Revocation List)

License

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

Copyright (C) 2010-2019 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
1.9.6

Definition in file x509_crl_parse.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file x509_crl_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 947 of file x509_crl_parse.c.

◆ x509ParseCrl()

error_t x509ParseCrl ( const uint8_t *  data,
size_t  length,
X509CrlInfo crlInfo 
)

Parse a CRL (Certificate Revocation List)

Parameters
[in]dataPointer to the CRL to parse
[in]lengthLength of the CRL
[out]crlInfoInformation resulting from the parsing process
Returns
Error code

Definition at line 54 of file x509_crl_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 766 of file x509_crl_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 443 of file x509_crl_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 574 of file x509_crl_parse.c.

◆ x509ParseCrlVersion()

error_t x509ParseCrlVersion ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509Version version 
)

Parse Version field.

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]versionInformation resulting from the parsing process
Returns
Error code

Definition at line 250 of file x509_crl_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 616 of file x509_crl_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 918 of file x509_crl_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 658 of file x509_crl_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 872 of file x509_crl_parse.c.

◆ x509ParseRevokedCertificate()

error_t x509ParseRevokedCertificate ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509RevokedCertificate revokedCertificate 
)

Parse RevokedCertificate field.

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]revokedCertificateInformation resulting from the parsing process
Returns
Error code

Definition at line 374 of file x509_crl_parse.c.

◆ x509ParseRevokedCertificates()

error_t x509ParseRevokedCertificates ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509TbsCertList tbsCertList 
)

Parse RevokedCertificates field.

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]tbsCertListInformation resulting from the parsing process
Returns
Error code

Definition at line 306 of file x509_crl_parse.c.

◆ x509ParseTbsCertList()

error_t x509ParseTbsCertList ( const uint8_t *  data,
size_t  length,
size_t *  totalLength,
X509TbsCertList tbsCertList 
)

Parse TBSCertList structure.

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]tbsCertListInformation resulting from the parsing process
Returns
Error code

Definition at line 133 of file x509_crl_parse.c.