ocsp_common.c File Reference

OCSP common definitions. More...

#include "ocsp/ocsp_common.h"
#include "encoding/oid.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   OCSP_TRACE_LEVEL
 

Functions

const HashAlgoocspSelectHashAlgo (void)
 Hash algorithm selection. More...
 
const HashAlgoocspGetHashAlgo (const uint8_t *oid, size_t length)
 Get the hash algorithm that matches the specified identifier. More...
 

Variables

const uint8_t PKIX_OCSP_BASIC_OID [9] = {0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x01}
 
const uint8_t PKIX_OCSP_NONCE_OID [9] = {0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x02}
 

Detailed Description

OCSP common definitions.

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 ocsp_common.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   OCSP_TRACE_LEVEL

Definition at line 32 of file ocsp_common.c.

Function Documentation

◆ ocspGetHashAlgo()

const HashAlgo* ocspGetHashAlgo ( const uint8_t *  oid,
size_t  length 
)

Get the hash algorithm that matches the specified identifier.

Parameters
[in]oidHash algorithm OID
[in]lengthLength of the hash algorithm OID, in bytes
Returns
Pointer to the hash algorithm

Definition at line 85 of file ocsp_common.c.

◆ ocspSelectHashAlgo()

const HashAlgo* ocspSelectHashAlgo ( void  )

Hash algorithm selection.

Returns
Pointer to the preferred hash algorithm

Definition at line 52 of file ocsp_common.c.

Variable Documentation

◆ PKIX_OCSP_BASIC_OID

const uint8_t PKIX_OCSP_BASIC_OID[9] = {0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x01}

Definition at line 42 of file ocsp_common.c.

◆ PKIX_OCSP_NONCE_OID

const uint8_t PKIX_OCSP_NONCE_OID[9] = {0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x02}

Definition at line 44 of file ocsp_common.c.