x509_csr.h
mbedtls/config.h
mbedtls/x509.h
mbedtls/asn1.h
mbedtls/bignum.h
mbedtls/check_config.h
mbedtls/config.h
mbedtls/ecdsa.h
mbedtls/ecp.h
mbedtls/md.h
mbedtls/pk.h
mbedtls/platform_time.h
mbedtls/platform_util.h
mbedtls/rsa.h
mbedtls/threading.h
mbedtls/x509.h
x509_csr.h
limits.h
pthread.h
stddef.h
stdint.h
stdio.h
stdlib.h
time.h
mbedtls_x509_csr
mbedtls_x509write_csr
Structures and functions for X.509 Certificate Signing Requests (CSR)
- mbedtls_x509_csr
- mbedtls_x509write_csr
- mbedtls_x509_csr_parse_der
- mbedtls_x509_csr_parse
- mbedtls_x509_csr_parse_file
- mbedtls_x509_csr_info
- mbedtls_x509_csr_init
- mbedtls_x509_csr_free
- mbedtls_x509write_csr_init
- mbedtls_x509write_csr_set_subject_name
- mbedtls_x509write_csr_set_key
- mbedtls_x509write_csr_set_md_alg
- mbedtls_x509write_csr_set_key_usage
- mbedtls_x509write_csr_set_ns_cert_type
- mbedtls_x509write_csr_set_extension
- mbedtls_x509write_csr_free
- mbedtls_x509write_csr_der
- mbedtls_x509write_csr_pem

X.509 certificate signing request parsing and writing.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_X509_CSR_H
    #defineMBEDTLS_X509_CSR_H

    #if!defined(MBEDTLS_CONFIG_FILE)
    #include"mbedtls/config.h"
    #else
    #includeMBEDTLS_CONFIG_FILE
    #endif

    #include"mbedtls/x509.h"

    #ifdef__cplusplus
    extern"C"{
    #endif

    typedefstructmbedtls_x509_csr{
    mbedtls_x509_bufraw;
    mbedtls_x509_bufcri;
    intversion;
    mbedtls_x509_bufsubject_raw;
    mbedtls_x509_namesubject;
    mbedtls_pk_contextpk;
    mbedtls_x509_bufsig_oid;
    mbedtls_x509_bufsig;
    mbedtls_md_type_tsig_md;
    mbedtls_pk_type_tsig_pk;
    void*sig_opts;
    }
    mbedtls_x509_csr;

    typedefstructmbedtls_x509write_csr{
    mbedtls_pk_context*key;
    mbedtls_asn1_named_data*subject;
    mbedtls_md_type_tmd_alg;
    mbedtls_asn1_named_data*extensions;
    }
    mbedtls_x509write_csr;

    #ifdefined(MBEDTLS_X509_CSR_PARSE_C)
    intmbedtls_x509_csr_parse_der(mbedtls_x509_csr*csr,
    constunsignedchar*buf,size_tbuflen);

    intmbedtls_x509_csr_parse(mbedtls_x509_csr*csr,constunsignedchar*buf,size_tbuflen);

    #ifdefined(MBEDTLS_FS_IO)
    intmbedtls_x509_csr_parse_file(mbedtls_x509_csr*csr,constchar*path);
    #endif/*MBEDTLS_FS_IO*/

    intmbedtls_x509_csr_info(char*buf,size_tsize,constchar*prefix,
    constmbedtls_x509_csr*csr);

    voidmbedtls_x509_csr_init(mbedtls_x509_csr*csr);

    voidmbedtls_x509_csr_free(mbedtls_x509_csr*csr);
    #endif/*MBEDTLS_X509_CSR_PARSE_C*/

    #ifdefined(MBEDTLS_X509_CSR_WRITE_C)
    voidmbedtls_x509write_csr_init(mbedtls_x509write_csr*ctx);

    intmbedtls_x509write_csr_set_subject_name(mbedtls_x509write_csr*ctx,
    constchar*subject_name);

    voidmbedtls_x509write_csr_set_key(mbedtls_x509write_csr*ctx,mbedtls_pk_context*key);

    voidmbedtls_x509write_csr_set_md_alg(mbedtls_x509write_csr*ctx,mbedtls_md_type_tmd_alg);

    intmbedtls_x509write_csr_set_key_usage(mbedtls_x509write_csr*ctx,unsignedcharkey_usage);

    intmbedtls_x509write_csr_set_ns_cert_type(mbedtls_x509write_csr*ctx,
    unsignedcharns_cert_type);

    intmbedtls_x509write_csr_set_extension(mbedtls_x509write_csr*ctx,
    constchar*oid,size_toid_len,
    constunsignedchar*val,size_tval_len);

    voidmbedtls_x509write_csr_free(mbedtls_x509write_csr*ctx);

    intmbedtls_x509write_csr_der(mbedtls_x509write_csr*ctx,unsignedchar*buf,size_tsize,
    int(*f_rng)(void*,unsignedchar*,size_t),
    void*p_rng);

    #ifdefined(MBEDTLS_PEM_WRITE_C)
    intmbedtls_x509write_csr_pem(mbedtls_x509write_csr*ctx,unsignedchar*buf,size_tsize,
    int(*f_rng)(void*,unsignedchar*,size_t),
    void*p_rng);
    #endif/*MBEDTLS_PEM_WRITE_C*/
    #endif/*MBEDTLS_X509_CSR_WRITE_C*/

    #ifdef__cplusplus
    }
    #endif

    #endif/*mbedtls_x509_csr.h*/