ocsp_client_misc.h File Reference

Helper functions for OCSP client. More...

#include "core/net.h"
#include "ocsp/ocsp_client.h"
#include "date_time.h"

Go to the source code of this file.

Functions

error_t ocspClientGenerateNonce (OcspClientContext *context)
 Nonce generation. More...
 
error_t ocspClientFormatHeader (OcspClientContext *context)
 Format HTTP request header. More...
 
error_t ocspClientFormatRequest (OcspClientContext *context, const char_t *cert, size_t certLen, const char_t *issuerCert, size_t issuerCertLen)
 Format OCSP request. More...
 
error_t ocspClientParseHeader (OcspClientContext *context)
 Parse HTTP response header. More...
 

Detailed Description

Helper functions for OCSP client.

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_client_misc.h.

Function Documentation

◆ ocspClientFormatHeader()

error_t ocspClientFormatHeader ( OcspClientContext context)

Format HTTP request header.

Parameters
[in]contextPointer to the OCSP client context
Returns
Error code

Definition at line 94 of file ocsp_client_misc.c.

◆ ocspClientFormatRequest()

error_t ocspClientFormatRequest ( OcspClientContext context,
const char_t cert,
size_t  certLen,
const char_t issuerCert,
size_t  issuerCertLen 
)

Format OCSP request.

Parameters
[in]contextPointer to the OCSP client context
[in]certCertificate to be checked (PEM or DER format)
[in]certLenLength of the certificate, in bytes
[in]issuerCertIssuer's certificate (PEM or DER format)
[in]issuerCertLenLength of the issuer certificate, in bytes
Returns
Error code

Definition at line 159 of file ocsp_client_misc.c.

◆ ocspClientGenerateNonce()

error_t ocspClientGenerateNonce ( OcspClientContext context)

Nonce generation.

Parameters
[in]contextPointer to the OCSP client context
Returns
Error code

Definition at line 53 of file ocsp_client_misc.c.

◆ ocspClientParseHeader()

error_t ocspClientParseHeader ( OcspClientContext context)

Parse HTTP response header.

Parameters
[in]contextPointer to the OCSP client context
Returns
Error code

Definition at line 318 of file ocsp_client_misc.c.