Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * ASN.1 buffer writing functionality |
| 3 | * |
Paul Bakker | 7dc4c44 | 2014-02-01 22:50:26 +0100 | [diff] [blame] | 4 | * Copyright (C) 2006-2014, Brainspark B.V. |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 5 | * |
Manuel Pégourié-Gonnard | 967a2a5 | 2015-01-22 14:28:16 +0000 | [diff] [blame^] | 6 | * This file is part of mbed TLS (http://www.polarssl.org) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 7 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
| 8 | * |
| 9 | * All rights reserved. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or |
| 14 | * (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License along |
| 22 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 24 | */ |
| 25 | |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 26 | #if !defined(POLARSSL_CONFIG_FILE) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 27 | #include "polarssl/config.h" |
Manuel Pégourié-Gonnard | cef4ad2 | 2014-04-29 12:39:06 +0200 | [diff] [blame] | 28 | #else |
| 29 | #include POLARSSL_CONFIG_FILE |
| 30 | #endif |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 31 | |
| 32 | #if defined(POLARSSL_ASN1_WRITE_C) |
| 33 | |
| 34 | #include "polarssl/asn1write.h" |
| 35 | |
Paul Bakker | 7dc4c44 | 2014-02-01 22:50:26 +0100 | [diff] [blame] | 36 | #if defined(POLARSSL_PLATFORM_C) |
| 37 | #include "polarssl/platform.h" |
Paul Bakker | 59ba59f | 2013-09-09 11:26:00 +0200 | [diff] [blame] | 38 | #else |
| 39 | #include <stdlib.h> |
| 40 | #define polarssl_malloc malloc |
| 41 | #define polarssl_free free |
| 42 | #endif |
| 43 | |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 44 | int asn1_write_len( unsigned char **p, unsigned char *start, size_t len ) |
| 45 | { |
| 46 | if( len < 0x80 ) |
| 47 | { |
| 48 | if( *p - start < 1 ) |
| 49 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 50 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 51 | *--(*p) = (unsigned char) len; |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 52 | return( 1 ); |
| 53 | } |
| 54 | |
| 55 | if( len <= 0xFF ) |
| 56 | { |
| 57 | if( *p - start < 2 ) |
| 58 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 59 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 60 | *--(*p) = (unsigned char) len; |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 61 | *--(*p) = 0x81; |
| 62 | return( 2 ); |
| 63 | } |
| 64 | |
| 65 | if( *p - start < 3 ) |
| 66 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 67 | |
| 68 | // We assume we never have lengths larger than 65535 bytes |
| 69 | // |
| 70 | *--(*p) = len % 256; |
| 71 | *--(*p) = ( len / 256 ) % 256; |
| 72 | *--(*p) = 0x82; |
| 73 | |
| 74 | return( 3 ); |
| 75 | } |
| 76 | |
| 77 | int asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag ) |
| 78 | { |
| 79 | if( *p - start < 1 ) |
| 80 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 81 | |
| 82 | *--(*p) = tag; |
| 83 | |
| 84 | return( 1 ); |
| 85 | } |
| 86 | |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 87 | int asn1_write_raw_buffer( unsigned char **p, unsigned char *start, |
| 88 | const unsigned char *buf, size_t size ) |
| 89 | { |
| 90 | size_t len = 0; |
| 91 | |
| 92 | if( *p - start < (int) size ) |
| 93 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 94 | |
| 95 | len = size; |
| 96 | (*p) -= len; |
| 97 | memcpy( *p, buf, len ); |
| 98 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 99 | return( (int) len ); |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 100 | } |
| 101 | |
Paul Bakker | ed27a04 | 2013-04-18 22:46:23 +0200 | [diff] [blame] | 102 | #if defined(POLARSSL_BIGNUM_C) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 103 | int asn1_write_mpi( unsigned char **p, unsigned char *start, mpi *X ) |
| 104 | { |
| 105 | int ret; |
| 106 | size_t len = 0; |
| 107 | |
| 108 | // Write the MPI |
| 109 | // |
| 110 | len = mpi_size( X ); |
| 111 | |
| 112 | if( *p - start < (int) len ) |
| 113 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 114 | |
| 115 | (*p) -= len; |
Paul Bakker | 3d8fb63 | 2014-04-17 12:42:41 +0200 | [diff] [blame] | 116 | MPI_CHK( mpi_write_binary( X, *p, len ) ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 117 | |
| 118 | // DER format assumes 2s complement for numbers, so the leftmost bit |
| 119 | // should be 0 for positive numbers and 1 for negative numbers. |
| 120 | // |
Paul Bakker | 66d5d07 | 2014-06-17 16:39:18 +0200 | [diff] [blame] | 121 | if( X->s ==1 && **p & 0x80 ) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 122 | { |
| 123 | if( *p - start < 1 ) |
| 124 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 125 | |
| 126 | *--(*p) = 0x00; |
| 127 | len += 1; |
| 128 | } |
| 129 | |
| 130 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 131 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_INTEGER ) ); |
| 132 | |
Paul Bakker | 3d8fb63 | 2014-04-17 12:42:41 +0200 | [diff] [blame] | 133 | ret = (int) len; |
| 134 | |
| 135 | cleanup: |
| 136 | return( ret ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 137 | } |
Paul Bakker | ed27a04 | 2013-04-18 22:46:23 +0200 | [diff] [blame] | 138 | #endif /* POLARSSL_BIGNUM_C */ |
| 139 | |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 140 | int asn1_write_null( unsigned char **p, unsigned char *start ) |
| 141 | { |
| 142 | int ret; |
| 143 | size_t len = 0; |
| 144 | |
| 145 | // Write NULL |
| 146 | // |
| 147 | ASN1_CHK_ADD( len, asn1_write_len( p, start, 0) ); |
| 148 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_NULL ) ); |
| 149 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 150 | return( (int) len ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 151 | } |
| 152 | |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 153 | int asn1_write_oid( unsigned char **p, unsigned char *start, |
| 154 | const char *oid, size_t oid_len ) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 155 | { |
| 156 | int ret; |
| 157 | size_t len = 0; |
| 158 | |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 159 | ASN1_CHK_ADD( len, asn1_write_raw_buffer( p, start, |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 160 | (const unsigned char *) oid, oid_len ) ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 161 | ASN1_CHK_ADD( len , asn1_write_len( p, start, len ) ); |
| 162 | ASN1_CHK_ADD( len , asn1_write_tag( p, start, ASN1_OID ) ); |
| 163 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 164 | return( (int) len ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | int asn1_write_algorithm_identifier( unsigned char **p, unsigned char *start, |
Manuel Pégourié-Gonnard | edda904 | 2013-09-12 02:17:54 +0200 | [diff] [blame] | 168 | const char *oid, size_t oid_len, |
| 169 | size_t par_len ) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 170 | { |
| 171 | int ret; |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 172 | size_t len = 0; |
| 173 | |
Manuel Pégourié-Gonnard | edda904 | 2013-09-12 02:17:54 +0200 | [diff] [blame] | 174 | if( par_len == 0 ) |
| 175 | ASN1_CHK_ADD( len, asn1_write_null( p, start ) ); |
| 176 | else |
| 177 | len += par_len; |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 178 | |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 179 | ASN1_CHK_ADD( len, asn1_write_oid( p, start, oid, oid_len ) ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 180 | |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 181 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 182 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, |
| 183 | ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ); |
| 184 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 185 | return( (int) len ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 186 | } |
| 187 | |
Paul Bakker | 329def3 | 2013-09-06 16:34:38 +0200 | [diff] [blame] | 188 | int asn1_write_bool( unsigned char **p, unsigned char *start, int boolean ) |
| 189 | { |
| 190 | int ret; |
| 191 | size_t len = 0; |
| 192 | |
| 193 | if( *p - start < 1 ) |
| 194 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 195 | |
| 196 | *--(*p) = (boolean) ? 1 : 0; |
| 197 | len++; |
| 198 | |
| 199 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 200 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_BOOLEAN ) ); |
| 201 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 202 | return( (int) len ); |
Paul Bakker | 329def3 | 2013-09-06 16:34:38 +0200 | [diff] [blame] | 203 | } |
| 204 | |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 205 | int asn1_write_int( unsigned char **p, unsigned char *start, int val ) |
| 206 | { |
| 207 | int ret; |
| 208 | size_t len = 0; |
| 209 | |
| 210 | // TODO negative values and values larger than 128 |
| 211 | // DER format assumes 2s complement for numbers, so the leftmost bit |
| 212 | // should be 0 for positive numbers and 1 for negative numbers. |
| 213 | // |
| 214 | if( *p - start < 1 ) |
| 215 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 216 | |
| 217 | len += 1; |
| 218 | *--(*p) = val; |
| 219 | |
Paul Bakker | 66d5d07 | 2014-06-17 16:39:18 +0200 | [diff] [blame] | 220 | if( val > 0 && **p & 0x80 ) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 221 | { |
| 222 | if( *p - start < 1 ) |
| 223 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 224 | |
| 225 | *--(*p) = 0x00; |
| 226 | len += 1; |
| 227 | } |
| 228 | |
| 229 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 230 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_INTEGER ) ); |
| 231 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 232 | return( (int) len ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | int asn1_write_printable_string( unsigned char **p, unsigned char *start, |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 236 | const char *text, size_t text_len ) |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 237 | { |
| 238 | int ret; |
| 239 | size_t len = 0; |
| 240 | |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 241 | ASN1_CHK_ADD( len, asn1_write_raw_buffer( p, start, |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 242 | (const unsigned char *) text, text_len ) ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 243 | |
| 244 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 245 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_PRINTABLE_STRING ) ); |
| 246 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 247 | return( (int) len ); |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 248 | } |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 249 | |
Paul Bakker | 0588815 | 2012-02-16 10:26:57 +0000 | [diff] [blame] | 250 | int asn1_write_ia5_string( unsigned char **p, unsigned char *start, |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 251 | const char *text, size_t text_len ) |
Paul Bakker | 0588815 | 2012-02-16 10:26:57 +0000 | [diff] [blame] | 252 | { |
| 253 | int ret; |
| 254 | size_t len = 0; |
| 255 | |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 256 | ASN1_CHK_ADD( len, asn1_write_raw_buffer( p, start, |
Paul Bakker | 5f45e62 | 2013-09-09 12:02:36 +0200 | [diff] [blame] | 257 | (const unsigned char *) text, text_len ) ); |
Paul Bakker | 0588815 | 2012-02-16 10:26:57 +0000 | [diff] [blame] | 258 | |
| 259 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 260 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_IA5_STRING ) ); |
| 261 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 262 | return( (int) len ); |
Paul Bakker | 0588815 | 2012-02-16 10:26:57 +0000 | [diff] [blame] | 263 | } |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 264 | |
| 265 | int asn1_write_bitstring( unsigned char **p, unsigned char *start, |
| 266 | const unsigned char *buf, size_t bits ) |
| 267 | { |
| 268 | int ret; |
| 269 | size_t len = 0, size; |
| 270 | |
| 271 | size = ( bits / 8 ) + ( ( bits % 8 ) ? 1 : 0 ); |
| 272 | |
| 273 | // Calculate byte length |
| 274 | // |
| 275 | if( *p - start < (int) size + 1 ) |
| 276 | return( POLARSSL_ERR_ASN1_BUF_TOO_SMALL ); |
| 277 | |
| 278 | len = size + 1; |
| 279 | (*p) -= size; |
| 280 | memcpy( *p, buf, size ); |
| 281 | |
| 282 | // Write unused bits |
| 283 | // |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 284 | *--(*p) = (unsigned char) (size * 8 - bits); |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 285 | |
| 286 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 287 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_BIT_STRING ) ); |
| 288 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 289 | return( (int) len ); |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 290 | } |
| 291 | |
| 292 | int asn1_write_octet_string( unsigned char **p, unsigned char *start, |
| 293 | const unsigned char *buf, size_t size ) |
| 294 | { |
| 295 | int ret; |
| 296 | size_t len = 0; |
| 297 | |
Paul Bakker | 9852d00 | 2013-08-26 17:56:37 +0200 | [diff] [blame] | 298 | ASN1_CHK_ADD( len, asn1_write_raw_buffer( p, start, buf, size ) ); |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 299 | |
| 300 | ASN1_CHK_ADD( len, asn1_write_len( p, start, len ) ); |
| 301 | ASN1_CHK_ADD( len, asn1_write_tag( p, start, ASN1_OCTET_STRING ) ); |
| 302 | |
Paul Bakker | b9cfaa0 | 2013-10-11 18:58:55 +0200 | [diff] [blame] | 303 | return( (int) len ); |
Paul Bakker | 598e450 | 2013-08-25 14:46:39 +0200 | [diff] [blame] | 304 | } |
Paul Bakker | 59ba59f | 2013-09-09 11:26:00 +0200 | [diff] [blame] | 305 | |
| 306 | asn1_named_data *asn1_store_named_data( asn1_named_data **head, |
| 307 | const char *oid, size_t oid_len, |
| 308 | const unsigned char *val, |
| 309 | size_t val_len ) |
| 310 | { |
| 311 | asn1_named_data *cur; |
| 312 | |
| 313 | if( ( cur = asn1_find_named_data( *head, oid, oid_len ) ) == NULL ) |
| 314 | { |
| 315 | // Add new entry if not present yet based on OID |
| 316 | // |
| 317 | if( ( cur = polarssl_malloc( sizeof(asn1_named_data) ) ) == NULL ) |
| 318 | return( NULL ); |
| 319 | |
| 320 | memset( cur, 0, sizeof(asn1_named_data) ); |
| 321 | |
| 322 | cur->oid.len = oid_len; |
| 323 | cur->oid.p = polarssl_malloc( oid_len ); |
| 324 | if( cur->oid.p == NULL ) |
| 325 | { |
| 326 | polarssl_free( cur ); |
| 327 | return( NULL ); |
| 328 | } |
| 329 | |
Manuel Pégourié-Gonnard | e5b0fc1 | 2014-11-12 22:27:42 +0100 | [diff] [blame] | 330 | memcpy( cur->oid.p, oid, oid_len ); |
| 331 | |
Paul Bakker | 59ba59f | 2013-09-09 11:26:00 +0200 | [diff] [blame] | 332 | cur->val.len = val_len; |
| 333 | cur->val.p = polarssl_malloc( val_len ); |
| 334 | if( cur->val.p == NULL ) |
| 335 | { |
| 336 | polarssl_free( cur->oid.p ); |
| 337 | polarssl_free( cur ); |
| 338 | return( NULL ); |
| 339 | } |
| 340 | |
Paul Bakker | 59ba59f | 2013-09-09 11:26:00 +0200 | [diff] [blame] | 341 | cur->next = *head; |
| 342 | *head = cur; |
| 343 | } |
| 344 | else if( cur->val.len < val_len ) |
| 345 | { |
| 346 | // Enlarge existing value buffer if needed |
| 347 | // |
| 348 | polarssl_free( cur->val.p ); |
| 349 | cur->val.p = NULL; |
| 350 | |
| 351 | cur->val.len = val_len; |
| 352 | cur->val.p = polarssl_malloc( val_len ); |
| 353 | if( cur->val.p == NULL ) |
| 354 | { |
| 355 | polarssl_free( cur->oid.p ); |
| 356 | polarssl_free( cur ); |
| 357 | return( NULL ); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | if( val != NULL ) |
| 362 | memcpy( cur->val.p, val, val_len ); |
| 363 | |
| 364 | return( cur ); |
| 365 | } |
Paul Bakker | 9af723c | 2014-05-01 13:03:14 +0200 | [diff] [blame] | 366 | #endif /* POLARSSL_ASN1_WRITE_C */ |