Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

pem.c File Reference

pem.c File Reference

PEM (Privacy-Enhanced Mail) More...

Go to the source code of this file.

Functions

error_t pemReadDhParameters (const char_t *input, size_t length, DhParameters *params)
 Decode a PEM file containing Diffie-Hellman parameters.
error_t pemReadRsaPrivateKey (const char_t *input, size_t length, RsaPrivateKey *key)
 Decode a PEM file containing a RSA private key.
error_t pemReadDsaPrivateKey (const char_t *input, size_t length, DsaPrivateKey *key)
 Decode a PEM file containing a DSA private key.
error_t pemReadEcParameters (const char_t *input, size_t length, EcDomainParameters *params)
 Decode a PEM file containing EC domain parameters.
error_t pemReadEcPrivateKey (const char_t *input, size_t length, Mpi *key)
 Decode a PEM file containing an EC private key.
error_t pemReadCertificate (const char_t **input, size_t *inputLength, uint8_t **output, size_t *outputSize, size_t *outputLength)
 Decode a PEM file containing a certificate.
int_t pemSearchTag (const char_t *s, size_t sLen, const char_t *tag, size_t tagLen)
 Search a string for a given tag.

Detailed Description

PEM (Privacy-Enhanced Mail)

License

Copyright (C) 2010-2017 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.7.6

Definition in file pem.c.


Function Documentation

error_t pemReadCertificate ( const char_t **  input,
size_t *  inputLength,
uint8_t **  output,
size_t *  outputSize,
size_t *  outputLength 
)

Decode a PEM file containing a certificate.

Parameters:
[in,out]inputPointer to the PEM structure
[in,out]inputLengthLength of the PEM structure
[in,out]outputPointer to the DER encoded certificate
[in,out]outputSizeSize of the memory block that holds the DER certificate
[out]outputLengthLength of the DER encoded certificate
Returns:
Error code

Definition at line 1394 of file pem.c.

error_t pemReadDhParameters ( const char_t *  input,
size_t  length,
DhParameters params 
)

Decode a PEM file containing Diffie-Hellman parameters.

Parameters:
[in]inputPointer to the PEM structure
[in]lengthLength of the PEM structure
[out]paramsDiffie-Hellman parameters resulting from the parsing process
Returns:
Error code

Definition at line 53 of file pem.c.

error_t pemReadDsaPrivateKey ( const char_t *  input,
size_t  length,
DsaPrivateKey key 
)

Decode a PEM file containing a DSA private key.

Parameters:
[in]inputPointer to the PEM structure
[in]lengthLength of the PEM structure
[out]keyDSA private key resulting from the parsing process
Returns:
Error code

Definition at line 537 of file pem.c.

error_t pemReadEcParameters ( const char_t *  input,
size_t  length,
EcDomainParameters params 
)

Decode a PEM file containing EC domain parameters.

Parameters:
[in]inputPointer to the PEM structure
[in]lengthLength of the PEM structure
[out]paramsEC domain parameters
Returns:
Error code

Definition at line 777 of file pem.c.

error_t pemReadEcPrivateKey ( const char_t *  input,
size_t  length,
Mpi key 
)

Decode a PEM file containing an EC private key.

Parameters:
[in]inputPointer to the PEM structure
[in]lengthLength of the PEM structure
[out]keyEC private key resulting from the parsing process
Returns:
Error code

Definition at line 1059 of file pem.c.

error_t pemReadRsaPrivateKey ( const char_t *  input,
size_t  length,
RsaPrivateKey key 
)

Decode a PEM file containing a RSA private key.

Parameters:
[in]inputPointer to the PEM structure
[in]lengthLength of the PEM structure
[out]keyRSA private key resulting from the parsing process
Returns:
Error code

Definition at line 217 of file pem.c.

int_t pemSearchTag ( const char_t *  s,
size_t  sLen,
const char_t *  tag,
size_t  tagLen 
)

Search a string for a given tag.

Parameters:
[in]sString to search
[in]sLenLength of the string to search
[in]tagString containing the tag to search for
[in]tagLenLength of the tag
Returns:
The index of the first occurrence of the tag in the string, or -1 if the tag does not appear in the string

Definition at line 1507 of file pem.c.