Preliminary main mbed library for nexpaq development

Committer:
nexpaq
Date:
Fri Nov 04 20:54:50 2016 +0000
Revision:
1:d96dbedaebdb
Parent:
0:6c56fb4bc5f0
Removed extra directories for other platforms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nexpaq 0:6c56fb4bc5f0 1 /*
nexpaq 0:6c56fb4bc5f0 2 * RFC 1521 base64 encoding/decoding
nexpaq 0:6c56fb4bc5f0 3 *
nexpaq 0:6c56fb4bc5f0 4 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
nexpaq 0:6c56fb4bc5f0 5 * SPDX-License-Identifier: Apache-2.0
nexpaq 0:6c56fb4bc5f0 6 *
nexpaq 0:6c56fb4bc5f0 7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
nexpaq 0:6c56fb4bc5f0 8 * not use this file except in compliance with the License.
nexpaq 0:6c56fb4bc5f0 9 * You may obtain a copy of the License at
nexpaq 0:6c56fb4bc5f0 10 *
nexpaq 0:6c56fb4bc5f0 11 * http://www.apache.org/licenses/LICENSE-2.0
nexpaq 0:6c56fb4bc5f0 12 *
nexpaq 0:6c56fb4bc5f0 13 * Unless required by applicable law or agreed to in writing, software
nexpaq 0:6c56fb4bc5f0 14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
nexpaq 0:6c56fb4bc5f0 15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
nexpaq 0:6c56fb4bc5f0 16 * See the License for the specific language governing permissions and
nexpaq 0:6c56fb4bc5f0 17 * limitations under the License.
nexpaq 0:6c56fb4bc5f0 18 *
nexpaq 0:6c56fb4bc5f0 19 * This file is part of mbed TLS (https://tls.mbed.org)
nexpaq 0:6c56fb4bc5f0 20 */
nexpaq 0:6c56fb4bc5f0 21
nexpaq 0:6c56fb4bc5f0 22 #if !defined(MBEDTLS_CONFIG_FILE)
nexpaq 0:6c56fb4bc5f0 23 #include "mbedtls/config.h"
nexpaq 0:6c56fb4bc5f0 24 #else
nexpaq 0:6c56fb4bc5f0 25 #include MBEDTLS_CONFIG_FILE
nexpaq 0:6c56fb4bc5f0 26 #endif
nexpaq 0:6c56fb4bc5f0 27
nexpaq 0:6c56fb4bc5f0 28 #if defined(MBEDTLS_BASE64_C)
nexpaq 0:6c56fb4bc5f0 29
nexpaq 0:6c56fb4bc5f0 30 #include "mbedtls/base64.h"
nexpaq 0:6c56fb4bc5f0 31
nexpaq 0:6c56fb4bc5f0 32 #include <stdint.h>
nexpaq 0:6c56fb4bc5f0 33
nexpaq 0:6c56fb4bc5f0 34 #if defined(MBEDTLS_SELF_TEST)
nexpaq 0:6c56fb4bc5f0 35 #include <string.h>
nexpaq 0:6c56fb4bc5f0 36 #if defined(MBEDTLS_PLATFORM_C)
nexpaq 0:6c56fb4bc5f0 37 #include "mbedtls/platform.h"
nexpaq 0:6c56fb4bc5f0 38 #else
nexpaq 0:6c56fb4bc5f0 39 #include <stdio.h>
nexpaq 0:6c56fb4bc5f0 40 #define mbedtls_printf printf
nexpaq 0:6c56fb4bc5f0 41 #endif /* MBEDTLS_PLATFORM_C */
nexpaq 0:6c56fb4bc5f0 42 #endif /* MBEDTLS_SELF_TEST */
nexpaq 0:6c56fb4bc5f0 43
nexpaq 0:6c56fb4bc5f0 44 static const unsigned char base64_enc_map[64] =
nexpaq 0:6c56fb4bc5f0 45 {
nexpaq 0:6c56fb4bc5f0 46 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
nexpaq 0:6c56fb4bc5f0 47 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
nexpaq 0:6c56fb4bc5f0 48 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
nexpaq 0:6c56fb4bc5f0 49 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
nexpaq 0:6c56fb4bc5f0 50 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
nexpaq 0:6c56fb4bc5f0 51 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7',
nexpaq 0:6c56fb4bc5f0 52 '8', '9', '+', '/'
nexpaq 0:6c56fb4bc5f0 53 };
nexpaq 0:6c56fb4bc5f0 54
nexpaq 0:6c56fb4bc5f0 55 static const unsigned char base64_dec_map[128] =
nexpaq 0:6c56fb4bc5f0 56 {
nexpaq 0:6c56fb4bc5f0 57 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
nexpaq 0:6c56fb4bc5f0 58 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
nexpaq 0:6c56fb4bc5f0 59 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
nexpaq 0:6c56fb4bc5f0 60 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
nexpaq 0:6c56fb4bc5f0 61 127, 127, 127, 62, 127, 127, 127, 63, 52, 53,
nexpaq 0:6c56fb4bc5f0 62 54, 55, 56, 57, 58, 59, 60, 61, 127, 127,
nexpaq 0:6c56fb4bc5f0 63 127, 64, 127, 127, 127, 0, 1, 2, 3, 4,
nexpaq 0:6c56fb4bc5f0 64 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
nexpaq 0:6c56fb4bc5f0 65 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
nexpaq 0:6c56fb4bc5f0 66 25, 127, 127, 127, 127, 127, 127, 26, 27, 28,
nexpaq 0:6c56fb4bc5f0 67 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
nexpaq 0:6c56fb4bc5f0 68 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
nexpaq 0:6c56fb4bc5f0 69 49, 50, 51, 127, 127, 127, 127, 127
nexpaq 0:6c56fb4bc5f0 70 };
nexpaq 0:6c56fb4bc5f0 71
nexpaq 0:6c56fb4bc5f0 72 #define BASE64_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */
nexpaq 0:6c56fb4bc5f0 73
nexpaq 0:6c56fb4bc5f0 74 /*
nexpaq 0:6c56fb4bc5f0 75 * Encode a buffer into base64 format
nexpaq 0:6c56fb4bc5f0 76 */
nexpaq 0:6c56fb4bc5f0 77 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
nexpaq 0:6c56fb4bc5f0 78 const unsigned char *src, size_t slen )
nexpaq 0:6c56fb4bc5f0 79 {
nexpaq 0:6c56fb4bc5f0 80 size_t i, n;
nexpaq 0:6c56fb4bc5f0 81 int C1, C2, C3;
nexpaq 0:6c56fb4bc5f0 82 unsigned char *p;
nexpaq 0:6c56fb4bc5f0 83
nexpaq 0:6c56fb4bc5f0 84 if( slen == 0 )
nexpaq 0:6c56fb4bc5f0 85 {
nexpaq 0:6c56fb4bc5f0 86 *olen = 0;
nexpaq 0:6c56fb4bc5f0 87 return( 0 );
nexpaq 0:6c56fb4bc5f0 88 }
nexpaq 0:6c56fb4bc5f0 89
nexpaq 0:6c56fb4bc5f0 90 n = slen / 3 + ( slen % 3 != 0 );
nexpaq 0:6c56fb4bc5f0 91
nexpaq 0:6c56fb4bc5f0 92 if( n > ( BASE64_SIZE_T_MAX - 1 ) / 4 )
nexpaq 0:6c56fb4bc5f0 93 {
nexpaq 0:6c56fb4bc5f0 94 *olen = BASE64_SIZE_T_MAX;
nexpaq 0:6c56fb4bc5f0 95 return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );
nexpaq 0:6c56fb4bc5f0 96 }
nexpaq 0:6c56fb4bc5f0 97
nexpaq 0:6c56fb4bc5f0 98 n *= 4;
nexpaq 0:6c56fb4bc5f0 99
nexpaq 0:6c56fb4bc5f0 100 if( ( dlen < n + 1 ) || ( NULL == dst ) )
nexpaq 0:6c56fb4bc5f0 101 {
nexpaq 0:6c56fb4bc5f0 102 *olen = n + 1;
nexpaq 0:6c56fb4bc5f0 103 return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );
nexpaq 0:6c56fb4bc5f0 104 }
nexpaq 0:6c56fb4bc5f0 105
nexpaq 0:6c56fb4bc5f0 106 n = ( slen / 3 ) * 3;
nexpaq 0:6c56fb4bc5f0 107
nexpaq 0:6c56fb4bc5f0 108 for( i = 0, p = dst; i < n; i += 3 )
nexpaq 0:6c56fb4bc5f0 109 {
nexpaq 0:6c56fb4bc5f0 110 C1 = *src++;
nexpaq 0:6c56fb4bc5f0 111 C2 = *src++;
nexpaq 0:6c56fb4bc5f0 112 C3 = *src++;
nexpaq 0:6c56fb4bc5f0 113
nexpaq 0:6c56fb4bc5f0 114 *p++ = base64_enc_map[(C1 >> 2) & 0x3F];
nexpaq 0:6c56fb4bc5f0 115 *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F];
nexpaq 0:6c56fb4bc5f0 116 *p++ = base64_enc_map[(((C2 & 15) << 2) + (C3 >> 6)) & 0x3F];
nexpaq 0:6c56fb4bc5f0 117 *p++ = base64_enc_map[C3 & 0x3F];
nexpaq 0:6c56fb4bc5f0 118 }
nexpaq 0:6c56fb4bc5f0 119
nexpaq 0:6c56fb4bc5f0 120 if( i < slen )
nexpaq 0:6c56fb4bc5f0 121 {
nexpaq 0:6c56fb4bc5f0 122 C1 = *src++;
nexpaq 0:6c56fb4bc5f0 123 C2 = ( ( i + 1 ) < slen ) ? *src++ : 0;
nexpaq 0:6c56fb4bc5f0 124
nexpaq 0:6c56fb4bc5f0 125 *p++ = base64_enc_map[(C1 >> 2) & 0x3F];
nexpaq 0:6c56fb4bc5f0 126 *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F];
nexpaq 0:6c56fb4bc5f0 127
nexpaq 0:6c56fb4bc5f0 128 if( ( i + 1 ) < slen )
nexpaq 0:6c56fb4bc5f0 129 *p++ = base64_enc_map[((C2 & 15) << 2) & 0x3F];
nexpaq 0:6c56fb4bc5f0 130 else *p++ = '=';
nexpaq 0:6c56fb4bc5f0 131
nexpaq 0:6c56fb4bc5f0 132 *p++ = '=';
nexpaq 0:6c56fb4bc5f0 133 }
nexpaq 0:6c56fb4bc5f0 134
nexpaq 0:6c56fb4bc5f0 135 *olen = p - dst;
nexpaq 0:6c56fb4bc5f0 136 *p = 0;
nexpaq 0:6c56fb4bc5f0 137
nexpaq 0:6c56fb4bc5f0 138 return( 0 );
nexpaq 0:6c56fb4bc5f0 139 }
nexpaq 0:6c56fb4bc5f0 140
nexpaq 0:6c56fb4bc5f0 141 /*
nexpaq 0:6c56fb4bc5f0 142 * Decode a base64-formatted buffer
nexpaq 0:6c56fb4bc5f0 143 */
nexpaq 0:6c56fb4bc5f0 144 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
nexpaq 0:6c56fb4bc5f0 145 const unsigned char *src, size_t slen )
nexpaq 0:6c56fb4bc5f0 146 {
nexpaq 0:6c56fb4bc5f0 147 size_t i, n;
nexpaq 0:6c56fb4bc5f0 148 uint32_t j, x;
nexpaq 0:6c56fb4bc5f0 149 unsigned char *p;
nexpaq 0:6c56fb4bc5f0 150
nexpaq 0:6c56fb4bc5f0 151 /* First pass: check for validity and get output length */
nexpaq 0:6c56fb4bc5f0 152 for( i = n = j = 0; i < slen; i++ )
nexpaq 0:6c56fb4bc5f0 153 {
nexpaq 0:6c56fb4bc5f0 154 /* Skip spaces before checking for EOL */
nexpaq 0:6c56fb4bc5f0 155 x = 0;
nexpaq 0:6c56fb4bc5f0 156 while( i < slen && src[i] == ' ' )
nexpaq 0:6c56fb4bc5f0 157 {
nexpaq 0:6c56fb4bc5f0 158 ++i;
nexpaq 0:6c56fb4bc5f0 159 ++x;
nexpaq 0:6c56fb4bc5f0 160 }
nexpaq 0:6c56fb4bc5f0 161
nexpaq 0:6c56fb4bc5f0 162 /* Spaces at end of buffer are OK */
nexpaq 0:6c56fb4bc5f0 163 if( i == slen )
nexpaq 0:6c56fb4bc5f0 164 break;
nexpaq 0:6c56fb4bc5f0 165
nexpaq 0:6c56fb4bc5f0 166 if( ( slen - i ) >= 2 &&
nexpaq 0:6c56fb4bc5f0 167 src[i] == '\r' && src[i + 1] == '\n' )
nexpaq 0:6c56fb4bc5f0 168 continue;
nexpaq 0:6c56fb4bc5f0 169
nexpaq 0:6c56fb4bc5f0 170 if( src[i] == '\n' )
nexpaq 0:6c56fb4bc5f0 171 continue;
nexpaq 0:6c56fb4bc5f0 172
nexpaq 0:6c56fb4bc5f0 173 /* Space inside a line is an error */
nexpaq 0:6c56fb4bc5f0 174 if( x != 0 )
nexpaq 0:6c56fb4bc5f0 175 return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER );
nexpaq 0:6c56fb4bc5f0 176
nexpaq 0:6c56fb4bc5f0 177 if( src[i] == '=' && ++j > 2 )
nexpaq 0:6c56fb4bc5f0 178 return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER );
nexpaq 0:6c56fb4bc5f0 179
nexpaq 0:6c56fb4bc5f0 180 if( src[i] > 127 || base64_dec_map[src[i]] == 127 )
nexpaq 0:6c56fb4bc5f0 181 return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER );
nexpaq 0:6c56fb4bc5f0 182
nexpaq 0:6c56fb4bc5f0 183 if( base64_dec_map[src[i]] < 64 && j != 0 )
nexpaq 0:6c56fb4bc5f0 184 return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER );
nexpaq 0:6c56fb4bc5f0 185
nexpaq 0:6c56fb4bc5f0 186 n++;
nexpaq 0:6c56fb4bc5f0 187 }
nexpaq 0:6c56fb4bc5f0 188
nexpaq 0:6c56fb4bc5f0 189 if( n == 0 )
nexpaq 0:6c56fb4bc5f0 190 {
nexpaq 0:6c56fb4bc5f0 191 *olen = 0;
nexpaq 0:6c56fb4bc5f0 192 return( 0 );
nexpaq 0:6c56fb4bc5f0 193 }
nexpaq 0:6c56fb4bc5f0 194
nexpaq 0:6c56fb4bc5f0 195 n = ( ( n * 6 ) + 7 ) >> 3;
nexpaq 0:6c56fb4bc5f0 196 n -= j;
nexpaq 0:6c56fb4bc5f0 197
nexpaq 0:6c56fb4bc5f0 198 if( dst == NULL || dlen < n )
nexpaq 0:6c56fb4bc5f0 199 {
nexpaq 0:6c56fb4bc5f0 200 *olen = n;
nexpaq 0:6c56fb4bc5f0 201 return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );
nexpaq 0:6c56fb4bc5f0 202 }
nexpaq 0:6c56fb4bc5f0 203
nexpaq 0:6c56fb4bc5f0 204 for( j = 3, n = x = 0, p = dst; i > 0; i--, src++ )
nexpaq 0:6c56fb4bc5f0 205 {
nexpaq 0:6c56fb4bc5f0 206 if( *src == '\r' || *src == '\n' || *src == ' ' )
nexpaq 0:6c56fb4bc5f0 207 continue;
nexpaq 0:6c56fb4bc5f0 208
nexpaq 0:6c56fb4bc5f0 209 j -= ( base64_dec_map[*src] == 64 );
nexpaq 0:6c56fb4bc5f0 210 x = ( x << 6 ) | ( base64_dec_map[*src] & 0x3F );
nexpaq 0:6c56fb4bc5f0 211
nexpaq 0:6c56fb4bc5f0 212 if( ++n == 4 )
nexpaq 0:6c56fb4bc5f0 213 {
nexpaq 0:6c56fb4bc5f0 214 n = 0;
nexpaq 0:6c56fb4bc5f0 215 if( j > 0 ) *p++ = (unsigned char)( x >> 16 );
nexpaq 0:6c56fb4bc5f0 216 if( j > 1 ) *p++ = (unsigned char)( x >> 8 );
nexpaq 0:6c56fb4bc5f0 217 if( j > 2 ) *p++ = (unsigned char)( x );
nexpaq 0:6c56fb4bc5f0 218 }
nexpaq 0:6c56fb4bc5f0 219 }
nexpaq 0:6c56fb4bc5f0 220
nexpaq 0:6c56fb4bc5f0 221 *olen = p - dst;
nexpaq 0:6c56fb4bc5f0 222
nexpaq 0:6c56fb4bc5f0 223 return( 0 );
nexpaq 0:6c56fb4bc5f0 224 }
nexpaq 0:6c56fb4bc5f0 225
nexpaq 0:6c56fb4bc5f0 226 #if defined(MBEDTLS_SELF_TEST)
nexpaq 0:6c56fb4bc5f0 227
nexpaq 0:6c56fb4bc5f0 228 static const unsigned char base64_test_dec[64] =
nexpaq 0:6c56fb4bc5f0 229 {
nexpaq 0:6c56fb4bc5f0 230 0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD,
nexpaq 0:6c56fb4bc5f0 231 0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01,
nexpaq 0:6c56fb4bc5f0 232 0x94, 0xED, 0x8F, 0x1E, 0x11, 0xB3, 0xD7, 0x09,
nexpaq 0:6c56fb4bc5f0 233 0x0C, 0xB6, 0xE9, 0x10, 0x6F, 0x22, 0xEE, 0x13,
nexpaq 0:6c56fb4bc5f0 234 0xCA, 0xB3, 0x07, 0x05, 0x76, 0xC9, 0xFA, 0x31,
nexpaq 0:6c56fb4bc5f0 235 0x6C, 0x08, 0x34, 0xFF, 0x8D, 0xC2, 0x6C, 0x38,
nexpaq 0:6c56fb4bc5f0 236 0x00, 0x43, 0xE9, 0x54, 0x97, 0xAF, 0x50, 0x4B,
nexpaq 0:6c56fb4bc5f0 237 0xD1, 0x41, 0xBA, 0x95, 0x31, 0x5A, 0x0B, 0x97
nexpaq 0:6c56fb4bc5f0 238 };
nexpaq 0:6c56fb4bc5f0 239
nexpaq 0:6c56fb4bc5f0 240 static const unsigned char base64_test_enc[] =
nexpaq 0:6c56fb4bc5f0 241 "JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i7hPK"
nexpaq 0:6c56fb4bc5f0 242 "swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw==";
nexpaq 0:6c56fb4bc5f0 243
nexpaq 0:6c56fb4bc5f0 244 /*
nexpaq 0:6c56fb4bc5f0 245 * Checkup routine
nexpaq 0:6c56fb4bc5f0 246 */
nexpaq 0:6c56fb4bc5f0 247 int mbedtls_base64_self_test( int verbose )
nexpaq 0:6c56fb4bc5f0 248 {
nexpaq 0:6c56fb4bc5f0 249 size_t len;
nexpaq 0:6c56fb4bc5f0 250 const unsigned char *src;
nexpaq 0:6c56fb4bc5f0 251 unsigned char buffer[128];
nexpaq 0:6c56fb4bc5f0 252
nexpaq 0:6c56fb4bc5f0 253 if( verbose != 0 )
nexpaq 0:6c56fb4bc5f0 254 mbedtls_printf( " Base64 encoding test: " );
nexpaq 0:6c56fb4bc5f0 255
nexpaq 0:6c56fb4bc5f0 256 src = base64_test_dec;
nexpaq 0:6c56fb4bc5f0 257
nexpaq 0:6c56fb4bc5f0 258 if( mbedtls_base64_encode( buffer, sizeof( buffer ), &len, src, 64 ) != 0 ||
nexpaq 0:6c56fb4bc5f0 259 memcmp( base64_test_enc, buffer, 88 ) != 0 )
nexpaq 0:6c56fb4bc5f0 260 {
nexpaq 0:6c56fb4bc5f0 261 if( verbose != 0 )
nexpaq 0:6c56fb4bc5f0 262 mbedtls_printf( "failed\n" );
nexpaq 0:6c56fb4bc5f0 263
nexpaq 0:6c56fb4bc5f0 264 return( 1 );
nexpaq 0:6c56fb4bc5f0 265 }
nexpaq 0:6c56fb4bc5f0 266
nexpaq 0:6c56fb4bc5f0 267 if( verbose != 0 )
nexpaq 0:6c56fb4bc5f0 268 mbedtls_printf( "passed\n Base64 decoding test: " );
nexpaq 0:6c56fb4bc5f0 269
nexpaq 0:6c56fb4bc5f0 270 src = base64_test_enc;
nexpaq 0:6c56fb4bc5f0 271
nexpaq 0:6c56fb4bc5f0 272 if( mbedtls_base64_decode( buffer, sizeof( buffer ), &len, src, 88 ) != 0 ||
nexpaq 0:6c56fb4bc5f0 273 memcmp( base64_test_dec, buffer, 64 ) != 0 )
nexpaq 0:6c56fb4bc5f0 274 {
nexpaq 0:6c56fb4bc5f0 275 if( verbose != 0 )
nexpaq 0:6c56fb4bc5f0 276 mbedtls_printf( "failed\n" );
nexpaq 0:6c56fb4bc5f0 277
nexpaq 0:6c56fb4bc5f0 278 return( 1 );
nexpaq 0:6c56fb4bc5f0 279 }
nexpaq 0:6c56fb4bc5f0 280
nexpaq 0:6c56fb4bc5f0 281 if( verbose != 0 )
nexpaq 0:6c56fb4bc5f0 282 mbedtls_printf( "passed\n\n" );
nexpaq 0:6c56fb4bc5f0 283
nexpaq 0:6c56fb4bc5f0 284 return( 0 );
nexpaq 0:6c56fb4bc5f0 285 }
nexpaq 0:6c56fb4bc5f0 286
nexpaq 0:6c56fb4bc5f0 287 #endif /* MBEDTLS_SELF_TEST */
nexpaq 0:6c56fb4bc5f0 288
nexpaq 0:6c56fb4bc5f0 289 #endif /* MBEDTLS_BASE64_C */