Pinned to some recent date

Committer:
Simon Cooksey
Date:
Thu Nov 17 16:43:53 2016 +0000
Revision:
0:fb7af294d5d9
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Simon Cooksey 0:fb7af294d5d9 1 /*
Simon Cooksey 0:fb7af294d5d9 2 * X.509 Certificate Signing Request writing
Simon Cooksey 0:fb7af294d5d9 3 *
Simon Cooksey 0:fb7af294d5d9 4 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
Simon Cooksey 0:fb7af294d5d9 5 * SPDX-License-Identifier: Apache-2.0
Simon Cooksey 0:fb7af294d5d9 6 *
Simon Cooksey 0:fb7af294d5d9 7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
Simon Cooksey 0:fb7af294d5d9 8 * not use this file except in compliance with the License.
Simon Cooksey 0:fb7af294d5d9 9 * You may obtain a copy of the License at
Simon Cooksey 0:fb7af294d5d9 10 *
Simon Cooksey 0:fb7af294d5d9 11 * http://www.apache.org/licenses/LICENSE-2.0
Simon Cooksey 0:fb7af294d5d9 12 *
Simon Cooksey 0:fb7af294d5d9 13 * Unless required by applicable law or agreed to in writing, software
Simon Cooksey 0:fb7af294d5d9 14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Simon Cooksey 0:fb7af294d5d9 15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Simon Cooksey 0:fb7af294d5d9 16 * See the License for the specific language governing permissions and
Simon Cooksey 0:fb7af294d5d9 17 * limitations under the License.
Simon Cooksey 0:fb7af294d5d9 18 *
Simon Cooksey 0:fb7af294d5d9 19 * This file is part of mbed TLS (https://tls.mbed.org)
Simon Cooksey 0:fb7af294d5d9 20 */
Simon Cooksey 0:fb7af294d5d9 21 /*
Simon Cooksey 0:fb7af294d5d9 22 * References:
Simon Cooksey 0:fb7af294d5d9 23 * - CSRs: PKCS#10 v1.7 aka RFC 2986
Simon Cooksey 0:fb7af294d5d9 24 * - attributes: PKCS#9 v2.0 aka RFC 2985
Simon Cooksey 0:fb7af294d5d9 25 */
Simon Cooksey 0:fb7af294d5d9 26
Simon Cooksey 0:fb7af294d5d9 27 #if !defined(MBEDTLS_CONFIG_FILE)
Simon Cooksey 0:fb7af294d5d9 28 #include "mbedtls/config.h"
Simon Cooksey 0:fb7af294d5d9 29 #else
Simon Cooksey 0:fb7af294d5d9 30 #include MBEDTLS_CONFIG_FILE
Simon Cooksey 0:fb7af294d5d9 31 #endif
Simon Cooksey 0:fb7af294d5d9 32
Simon Cooksey 0:fb7af294d5d9 33 #if defined(MBEDTLS_X509_CSR_WRITE_C)
Simon Cooksey 0:fb7af294d5d9 34
Simon Cooksey 0:fb7af294d5d9 35 #include "mbedtls/x509_csr.h"
Simon Cooksey 0:fb7af294d5d9 36 #include "mbedtls/oid.h"
Simon Cooksey 0:fb7af294d5d9 37 #include "mbedtls/asn1write.h"
Simon Cooksey 0:fb7af294d5d9 38
Simon Cooksey 0:fb7af294d5d9 39 #include <string.h>
Simon Cooksey 0:fb7af294d5d9 40 #include <stdlib.h>
Simon Cooksey 0:fb7af294d5d9 41
Simon Cooksey 0:fb7af294d5d9 42 #if defined(MBEDTLS_PEM_WRITE_C)
Simon Cooksey 0:fb7af294d5d9 43 #include "mbedtls/pem.h"
Simon Cooksey 0:fb7af294d5d9 44 #endif
Simon Cooksey 0:fb7af294d5d9 45
Simon Cooksey 0:fb7af294d5d9 46 /* Implementation that should never be optimized out by the compiler */
Simon Cooksey 0:fb7af294d5d9 47 static void mbedtls_zeroize( void *v, size_t n ) {
Simon Cooksey 0:fb7af294d5d9 48 volatile unsigned char *p = v; while( n-- ) *p++ = 0;
Simon Cooksey 0:fb7af294d5d9 49 }
Simon Cooksey 0:fb7af294d5d9 50
Simon Cooksey 0:fb7af294d5d9 51 void mbedtls_x509write_csr_init( mbedtls_x509write_csr *ctx )
Simon Cooksey 0:fb7af294d5d9 52 {
Simon Cooksey 0:fb7af294d5d9 53 memset( ctx, 0, sizeof(mbedtls_x509write_csr) );
Simon Cooksey 0:fb7af294d5d9 54 }
Simon Cooksey 0:fb7af294d5d9 55
Simon Cooksey 0:fb7af294d5d9 56 void mbedtls_x509write_csr_free( mbedtls_x509write_csr *ctx )
Simon Cooksey 0:fb7af294d5d9 57 {
Simon Cooksey 0:fb7af294d5d9 58 mbedtls_asn1_free_named_data_list( &ctx->subject );
Simon Cooksey 0:fb7af294d5d9 59 mbedtls_asn1_free_named_data_list( &ctx->extensions );
Simon Cooksey 0:fb7af294d5d9 60
Simon Cooksey 0:fb7af294d5d9 61 mbedtls_zeroize( ctx, sizeof(mbedtls_x509write_csr) );
Simon Cooksey 0:fb7af294d5d9 62 }
Simon Cooksey 0:fb7af294d5d9 63
Simon Cooksey 0:fb7af294d5d9 64 void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg )
Simon Cooksey 0:fb7af294d5d9 65 {
Simon Cooksey 0:fb7af294d5d9 66 ctx->md_alg = md_alg;
Simon Cooksey 0:fb7af294d5d9 67 }
Simon Cooksey 0:fb7af294d5d9 68
Simon Cooksey 0:fb7af294d5d9 69 void mbedtls_x509write_csr_set_key( mbedtls_x509write_csr *ctx, mbedtls_pk_context *key )
Simon Cooksey 0:fb7af294d5d9 70 {
Simon Cooksey 0:fb7af294d5d9 71 ctx->key = key;
Simon Cooksey 0:fb7af294d5d9 72 }
Simon Cooksey 0:fb7af294d5d9 73
Simon Cooksey 0:fb7af294d5d9 74 int mbedtls_x509write_csr_set_subject_name( mbedtls_x509write_csr *ctx,
Simon Cooksey 0:fb7af294d5d9 75 const char *subject_name )
Simon Cooksey 0:fb7af294d5d9 76 {
Simon Cooksey 0:fb7af294d5d9 77 return mbedtls_x509_string_to_names( &ctx->subject, subject_name );
Simon Cooksey 0:fb7af294d5d9 78 }
Simon Cooksey 0:fb7af294d5d9 79
Simon Cooksey 0:fb7af294d5d9 80 int mbedtls_x509write_csr_set_extension( mbedtls_x509write_csr *ctx,
Simon Cooksey 0:fb7af294d5d9 81 const char *oid, size_t oid_len,
Simon Cooksey 0:fb7af294d5d9 82 const unsigned char *val, size_t val_len )
Simon Cooksey 0:fb7af294d5d9 83 {
Simon Cooksey 0:fb7af294d5d9 84 return mbedtls_x509_set_extension( &ctx->extensions, oid, oid_len,
Simon Cooksey 0:fb7af294d5d9 85 0, val, val_len );
Simon Cooksey 0:fb7af294d5d9 86 }
Simon Cooksey 0:fb7af294d5d9 87
Simon Cooksey 0:fb7af294d5d9 88 int mbedtls_x509write_csr_set_key_usage( mbedtls_x509write_csr *ctx, unsigned char key_usage )
Simon Cooksey 0:fb7af294d5d9 89 {
Simon Cooksey 0:fb7af294d5d9 90 unsigned char buf[4];
Simon Cooksey 0:fb7af294d5d9 91 unsigned char *c;
Simon Cooksey 0:fb7af294d5d9 92 int ret;
Simon Cooksey 0:fb7af294d5d9 93
Simon Cooksey 0:fb7af294d5d9 94 c = buf + 4;
Simon Cooksey 0:fb7af294d5d9 95
Simon Cooksey 0:fb7af294d5d9 96 if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &key_usage, 7 ) ) != 4 )
Simon Cooksey 0:fb7af294d5d9 97 return( ret );
Simon Cooksey 0:fb7af294d5d9 98
Simon Cooksey 0:fb7af294d5d9 99 ret = mbedtls_x509write_csr_set_extension( ctx, MBEDTLS_OID_KEY_USAGE,
Simon Cooksey 0:fb7af294d5d9 100 MBEDTLS_OID_SIZE( MBEDTLS_OID_KEY_USAGE ),
Simon Cooksey 0:fb7af294d5d9 101 buf, 4 );
Simon Cooksey 0:fb7af294d5d9 102 if( ret != 0 )
Simon Cooksey 0:fb7af294d5d9 103 return( ret );
Simon Cooksey 0:fb7af294d5d9 104
Simon Cooksey 0:fb7af294d5d9 105 return( 0 );
Simon Cooksey 0:fb7af294d5d9 106 }
Simon Cooksey 0:fb7af294d5d9 107
Simon Cooksey 0:fb7af294d5d9 108 int mbedtls_x509write_csr_set_ns_cert_type( mbedtls_x509write_csr *ctx,
Simon Cooksey 0:fb7af294d5d9 109 unsigned char ns_cert_type )
Simon Cooksey 0:fb7af294d5d9 110 {
Simon Cooksey 0:fb7af294d5d9 111 unsigned char buf[4];
Simon Cooksey 0:fb7af294d5d9 112 unsigned char *c;
Simon Cooksey 0:fb7af294d5d9 113 int ret;
Simon Cooksey 0:fb7af294d5d9 114
Simon Cooksey 0:fb7af294d5d9 115 c = buf + 4;
Simon Cooksey 0:fb7af294d5d9 116
Simon Cooksey 0:fb7af294d5d9 117 if( ( ret = mbedtls_asn1_write_bitstring( &c, buf, &ns_cert_type, 8 ) ) != 4 )
Simon Cooksey 0:fb7af294d5d9 118 return( ret );
Simon Cooksey 0:fb7af294d5d9 119
Simon Cooksey 0:fb7af294d5d9 120 ret = mbedtls_x509write_csr_set_extension( ctx, MBEDTLS_OID_NS_CERT_TYPE,
Simon Cooksey 0:fb7af294d5d9 121 MBEDTLS_OID_SIZE( MBEDTLS_OID_NS_CERT_TYPE ),
Simon Cooksey 0:fb7af294d5d9 122 buf, 4 );
Simon Cooksey 0:fb7af294d5d9 123 if( ret != 0 )
Simon Cooksey 0:fb7af294d5d9 124 return( ret );
Simon Cooksey 0:fb7af294d5d9 125
Simon Cooksey 0:fb7af294d5d9 126 return( 0 );
Simon Cooksey 0:fb7af294d5d9 127 }
Simon Cooksey 0:fb7af294d5d9 128
Simon Cooksey 0:fb7af294d5d9 129 int mbedtls_x509write_csr_der( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
Simon Cooksey 0:fb7af294d5d9 130 int (*f_rng)(void *, unsigned char *, size_t),
Simon Cooksey 0:fb7af294d5d9 131 void *p_rng )
Simon Cooksey 0:fb7af294d5d9 132 {
Simon Cooksey 0:fb7af294d5d9 133 int ret;
Simon Cooksey 0:fb7af294d5d9 134 const char *sig_oid;
Simon Cooksey 0:fb7af294d5d9 135 size_t sig_oid_len = 0;
Simon Cooksey 0:fb7af294d5d9 136 unsigned char *c, *c2;
Simon Cooksey 0:fb7af294d5d9 137 unsigned char hash[64];
Simon Cooksey 0:fb7af294d5d9 138 unsigned char sig[MBEDTLS_MPI_MAX_SIZE];
Simon Cooksey 0:fb7af294d5d9 139 unsigned char tmp_buf[2048];
Simon Cooksey 0:fb7af294d5d9 140 size_t pub_len = 0, sig_and_oid_len = 0, sig_len;
Simon Cooksey 0:fb7af294d5d9 141 size_t len = 0;
Simon Cooksey 0:fb7af294d5d9 142 mbedtls_pk_type_t pk_alg;
Simon Cooksey 0:fb7af294d5d9 143
Simon Cooksey 0:fb7af294d5d9 144 /*
Simon Cooksey 0:fb7af294d5d9 145 * Prepare data to be signed in tmp_buf
Simon Cooksey 0:fb7af294d5d9 146 */
Simon Cooksey 0:fb7af294d5d9 147 c = tmp_buf + sizeof( tmp_buf );
Simon Cooksey 0:fb7af294d5d9 148
Simon Cooksey 0:fb7af294d5d9 149 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_extensions( &c, tmp_buf, ctx->extensions ) );
Simon Cooksey 0:fb7af294d5d9 150
Simon Cooksey 0:fb7af294d5d9 151 if( len )
Simon Cooksey 0:fb7af294d5d9 152 {
Simon Cooksey 0:fb7af294d5d9 153 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) );
Simon Cooksey 0:fb7af294d5d9 154 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 155 MBEDTLS_ASN1_SEQUENCE ) );
Simon Cooksey 0:fb7af294d5d9 156
Simon Cooksey 0:fb7af294d5d9 157 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) );
Simon Cooksey 0:fb7af294d5d9 158 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 159 MBEDTLS_ASN1_SET ) );
Simon Cooksey 0:fb7af294d5d9 160
Simon Cooksey 0:fb7af294d5d9 161 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_oid( &c, tmp_buf, MBEDTLS_OID_PKCS9_CSR_EXT_REQ,
Simon Cooksey 0:fb7af294d5d9 162 MBEDTLS_OID_SIZE( MBEDTLS_OID_PKCS9_CSR_EXT_REQ ) ) );
Simon Cooksey 0:fb7af294d5d9 163
Simon Cooksey 0:fb7af294d5d9 164 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) );
Simon Cooksey 0:fb7af294d5d9 165 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 166 MBEDTLS_ASN1_SEQUENCE ) );
Simon Cooksey 0:fb7af294d5d9 167 }
Simon Cooksey 0:fb7af294d5d9 168
Simon Cooksey 0:fb7af294d5d9 169 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) );
Simon Cooksey 0:fb7af294d5d9 170 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 171 MBEDTLS_ASN1_CONTEXT_SPECIFIC ) );
Simon Cooksey 0:fb7af294d5d9 172
Simon Cooksey 0:fb7af294d5d9 173 MBEDTLS_ASN1_CHK_ADD( pub_len, mbedtls_pk_write_pubkey_der( ctx->key,
Simon Cooksey 0:fb7af294d5d9 174 tmp_buf, c - tmp_buf ) );
Simon Cooksey 0:fb7af294d5d9 175 c -= pub_len;
Simon Cooksey 0:fb7af294d5d9 176 len += pub_len;
Simon Cooksey 0:fb7af294d5d9 177
Simon Cooksey 0:fb7af294d5d9 178 /*
Simon Cooksey 0:fb7af294d5d9 179 * Subject ::= Name
Simon Cooksey 0:fb7af294d5d9 180 */
Simon Cooksey 0:fb7af294d5d9 181 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_x509_write_names( &c, tmp_buf, ctx->subject ) );
Simon Cooksey 0:fb7af294d5d9 182
Simon Cooksey 0:fb7af294d5d9 183 /*
Simon Cooksey 0:fb7af294d5d9 184 * Version ::= INTEGER { v1(0), v2(1), v3(2) }
Simon Cooksey 0:fb7af294d5d9 185 */
Simon Cooksey 0:fb7af294d5d9 186 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_int( &c, tmp_buf, 0 ) );
Simon Cooksey 0:fb7af294d5d9 187
Simon Cooksey 0:fb7af294d5d9 188 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, tmp_buf, len ) );
Simon Cooksey 0:fb7af294d5d9 189 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c, tmp_buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 190 MBEDTLS_ASN1_SEQUENCE ) );
Simon Cooksey 0:fb7af294d5d9 191
Simon Cooksey 0:fb7af294d5d9 192 /*
Simon Cooksey 0:fb7af294d5d9 193 * Prepare signature
Simon Cooksey 0:fb7af294d5d9 194 */
Simon Cooksey 0:fb7af294d5d9 195 mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash );
Simon Cooksey 0:fb7af294d5d9 196
Simon Cooksey 0:fb7af294d5d9 197 pk_alg = mbedtls_pk_get_type( ctx->key );
Simon Cooksey 0:fb7af294d5d9 198 if( pk_alg == MBEDTLS_PK_ECKEY )
Simon Cooksey 0:fb7af294d5d9 199 pk_alg = MBEDTLS_PK_ECDSA;
Simon Cooksey 0:fb7af294d5d9 200
Simon Cooksey 0:fb7af294d5d9 201 if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len,
Simon Cooksey 0:fb7af294d5d9 202 f_rng, p_rng ) ) != 0 ||
Simon Cooksey 0:fb7af294d5d9 203 ( ret = mbedtls_oid_get_oid_by_sig_alg( pk_alg, ctx->md_alg,
Simon Cooksey 0:fb7af294d5d9 204 &sig_oid, &sig_oid_len ) ) != 0 )
Simon Cooksey 0:fb7af294d5d9 205 {
Simon Cooksey 0:fb7af294d5d9 206 return( ret );
Simon Cooksey 0:fb7af294d5d9 207 }
Simon Cooksey 0:fb7af294d5d9 208
Simon Cooksey 0:fb7af294d5d9 209 /*
Simon Cooksey 0:fb7af294d5d9 210 * Write data to output buffer
Simon Cooksey 0:fb7af294d5d9 211 */
Simon Cooksey 0:fb7af294d5d9 212 c2 = buf + size;
Simon Cooksey 0:fb7af294d5d9 213 MBEDTLS_ASN1_CHK_ADD( sig_and_oid_len, mbedtls_x509_write_sig( &c2, buf,
Simon Cooksey 0:fb7af294d5d9 214 sig_oid, sig_oid_len, sig, sig_len ) );
Simon Cooksey 0:fb7af294d5d9 215
Simon Cooksey 0:fb7af294d5d9 216 if( len > (size_t)( c2 - buf ) )
Simon Cooksey 0:fb7af294d5d9 217 return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
Simon Cooksey 0:fb7af294d5d9 218
Simon Cooksey 0:fb7af294d5d9 219 c2 -= len;
Simon Cooksey 0:fb7af294d5d9 220 memcpy( c2, c, len );
Simon Cooksey 0:fb7af294d5d9 221
Simon Cooksey 0:fb7af294d5d9 222 len += sig_and_oid_len;
Simon Cooksey 0:fb7af294d5d9 223 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c2, buf, len ) );
Simon Cooksey 0:fb7af294d5d9 224 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_tag( &c2, buf, MBEDTLS_ASN1_CONSTRUCTED |
Simon Cooksey 0:fb7af294d5d9 225 MBEDTLS_ASN1_SEQUENCE ) );
Simon Cooksey 0:fb7af294d5d9 226
Simon Cooksey 0:fb7af294d5d9 227 return( (int) len );
Simon Cooksey 0:fb7af294d5d9 228 }
Simon Cooksey 0:fb7af294d5d9 229
Simon Cooksey 0:fb7af294d5d9 230 #define PEM_BEGIN_CSR "-----BEGIN CERTIFICATE REQUEST-----\n"
Simon Cooksey 0:fb7af294d5d9 231 #define PEM_END_CSR "-----END CERTIFICATE REQUEST-----\n"
Simon Cooksey 0:fb7af294d5d9 232
Simon Cooksey 0:fb7af294d5d9 233 #if defined(MBEDTLS_PEM_WRITE_C)
Simon Cooksey 0:fb7af294d5d9 234 int mbedtls_x509write_csr_pem( mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
Simon Cooksey 0:fb7af294d5d9 235 int (*f_rng)(void *, unsigned char *, size_t),
Simon Cooksey 0:fb7af294d5d9 236 void *p_rng )
Simon Cooksey 0:fb7af294d5d9 237 {
Simon Cooksey 0:fb7af294d5d9 238 int ret;
Simon Cooksey 0:fb7af294d5d9 239 unsigned char output_buf[4096];
Simon Cooksey 0:fb7af294d5d9 240 size_t olen = 0;
Simon Cooksey 0:fb7af294d5d9 241
Simon Cooksey 0:fb7af294d5d9 242 if( ( ret = mbedtls_x509write_csr_der( ctx, output_buf, sizeof(output_buf),
Simon Cooksey 0:fb7af294d5d9 243 f_rng, p_rng ) ) < 0 )
Simon Cooksey 0:fb7af294d5d9 244 {
Simon Cooksey 0:fb7af294d5d9 245 return( ret );
Simon Cooksey 0:fb7af294d5d9 246 }
Simon Cooksey 0:fb7af294d5d9 247
Simon Cooksey 0:fb7af294d5d9 248 if( ( ret = mbedtls_pem_write_buffer( PEM_BEGIN_CSR, PEM_END_CSR,
Simon Cooksey 0:fb7af294d5d9 249 output_buf + sizeof(output_buf) - ret,
Simon Cooksey 0:fb7af294d5d9 250 ret, buf, size, &olen ) ) != 0 )
Simon Cooksey 0:fb7af294d5d9 251 {
Simon Cooksey 0:fb7af294d5d9 252 return( ret );
Simon Cooksey 0:fb7af294d5d9 253 }
Simon Cooksey 0:fb7af294d5d9 254
Simon Cooksey 0:fb7af294d5d9 255 return( 0 );
Simon Cooksey 0:fb7af294d5d9 256 }
Simon Cooksey 0:fb7af294d5d9 257 #endif /* MBEDTLS_PEM_WRITE_C */
Simon Cooksey 0:fb7af294d5d9 258
Simon Cooksey 0:fb7af294d5d9 259 #endif /* MBEDTLS_X509_CSR_WRITE_C */