x509_csr.h
mbedtls/private_access.h
mbedtls/build_info.h
mbedtls/x509.h
mbedtls/asn1.h
mbedtls/bignum.h
mbedtls/build_info.h
mbedtls/ccm.h
mbedtls/chacha20.h
mbedtls/chachapoly.h
mbedtls/check_config.h
mbedtls/cipher.h
mbedtls/cmac.h
mbedtls/config_adjust_legacy_crypto.h
mbedtls/config_adjust_psa_from_legacy.h
mbedtls/config_adjust_psa_superset_legacy.h
mbedtls/config_adjust_ssl.h
mbedtls/config_adjust_x509.h
mbedtls/config_psa.h
mbedtls/ecdsa.h
mbedtls/ecjpake.h
mbedtls/ecp.h
mbedtls/gcm.h
mbedtls/mbedtls_config.h
mbedtls/md.h
mbedtls/md5.h
mbedtls/pk.h
mbedtls/platform_time.h
mbedtls/platform_util.h
mbedtls/poly1305.h
mbedtls/private_access.h
mbedtls/ripemd160.h
mbedtls/rsa.h
mbedtls/sha1.h
mbedtls/sha256.h
mbedtls/sha3.h
mbedtls/sha512.h
mbedtls/threading.h
mbedtls/x509.h
x509_csr.h
psa/build_info.h
psa/crypto.h
psa/crypto_adjust_auto_enabled.h
psa/crypto_adjust_config_dependencies.h
psa/crypto_adjust_config_key_pair_types.h
psa/crypto_adjust_config_synonyms.h
psa/crypto_builtin_composites.h
psa/crypto_builtin_key_derivation.h
psa/crypto_builtin_primitives.h
crypto_compat.h
psa/crypto_driver_common.h
psa/crypto_driver_contexts_composites.h
psa/crypto_driver_contexts_key_derivation.h
psa/crypto_driver_contexts_primitives.h
crypto_extra.h
psa/crypto_legacy.h
crypto_platform.h
crypto_sizes.h
crypto_struct.h
crypto_types.h
crypto_values.h
inttypes.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_ext_cb_t
- mbedtls_x509_csr_parse_der
- mbedtls_x509_csr_parse_der_with_ext_cb
- 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_subject_alternative_name
- 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
    #include"mbedtls/private_access.h"

    #include"mbedtls/build_info.h"

    #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;

    unsignedintkey_usage;
    unsignedcharns_cert_type;
    mbedtls_x509_sequencesubject_alt_names;

    intMBEDTLS_PRIVATE(ext_types);

    mbedtls_x509_bufsig_oid;
    mbedtls_x509_bufMBEDTLS_PRIVATE(sig);
    mbedtls_md_type_tMBEDTLS_PRIVATE(sig_md);
    mbedtls_pk_type_tMBEDTLS_PRIVATE(sig_pk);
    void*MBEDTLS_PRIVATE(sig_opts);
    }
    mbedtls_x509_csr;

    typedefstructmbedtls_x509write_csr{
    mbedtls_pk_context*MBEDTLS_PRIVATE(key);
    mbedtls_asn1_named_data*MBEDTLS_PRIVATE(subject);
    mbedtls_md_type_tMBEDTLS_PRIVATE(md_alg);
    mbedtls_asn1_named_data*MBEDTLS_PRIVATE(extensions);
    }
    mbedtls_x509write_csr;

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

    typedefint(*mbedtls_x509_csr_ext_cb_t)(void*p_ctx,
    mbedtls_x509_csrconst*csr,
    mbedtls_x509_bufconst*oid,
    intcritical,
    constunsignedchar*p,
    constunsignedchar*end);

    intmbedtls_x509_csr_parse_der_with_ext_cb(mbedtls_x509_csr*csr,
    constunsignedchar*buf,size_tbuflen,
    mbedtls_x509_csr_ext_cb_tcb,
    void*p_ctx);

    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*/

    #if!defined(MBEDTLS_X509_REMOVE_INFO)
    intmbedtls_x509_csr_info(char*buf,size_tsize,constchar*prefix,
    constmbedtls_x509_csr*csr);
    #endif/*!MBEDTLS_X509_REMOVE_INFO*/

    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_subject_alternative_name(mbedtls_x509write_csr*ctx,
    constmbedtls_x509_san_list*san_list);

    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,
    intcritical,
    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,
    mbedtls_f_rng_t*f_rng,
    void*p_rng);

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

    #ifdef__cplusplus
    }
    #endif

    #endif/*mbedtls_x509_csr.h*/