mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make numerous improvements
- Python static hello world now 1.8mb - Python static fully loaded now 10mb - Python HTTPS client now uses MbedTLS - Python REPL now completes import stmts - Increase stack size for Python for now - Begin synthesizing posixpath and ntpath - Restore Python \N{UNICODE NAME} support - Restore Python NFKD symbol normalization - Add optimized code path for Intel SHA-NI - Get more Python unit tests passing faster - Get Python help() pagination working on NT - Python hashlib now supports MbedTLS PBKDF2 - Make memcpy/memmove/memcmp/bcmp/etc. faster - Add Mersenne Twister and Vigna to LIBC_RAND - Provide privileged __printf() for error code - Fix zipos opendir() so that it reports ENOTDIR - Add basic chmod() implementation for Windows NT - Add Cosmo's best functions to Python cosmo module - Pin function trace indent depth to that of caller - Show memory diagram on invalid access in MODE=dbg - Differentiate stack overflow on crash in MODE=dbg - Add stb_truetype and tools for analyzing font files - Upgrade to UNICODE 13 and reduce its binary footprint - COMPILE.COM now logs resource usage of build commands - Start implementing basic poll() support on bare metal - Set getauxval(AT_EXECFN) to GetModuleFileName() on NT - Add descriptions to strerror() in non-TINY build modes - Add COUNTBRANCH() macro to help with micro-optimizations - Make error / backtrace / asan / memory code more unbreakable - Add fast perfect C implementation of μ-Law and a-Law audio codecs - Make strtol() functions consistent with other libc implementations - Improve Linenoise implementation (see also github.com/jart/bestline) - COMPILE.COM now suppresses stdout/stderr of successful build commands
This commit is contained in:
parent
fa7b4f5bd1
commit
39bf41f4eb
806 changed files with 77494 additions and 63859 deletions
|
@ -849,7 +849,7 @@ void test_enc_dec_buf( int cipher_id, char * cipher_string, int key_len,
|
|||
|
||||
/* check result */
|
||||
TEST_ASSERT( total_len == length );
|
||||
TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) );
|
||||
TEST_ASSERT( 0 == timingsafe_bcmp(inbuf, decbuf, length) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1097,7 +1097,7 @@ void test_enc_dec_buf_multipart( int cipher_id, int key_len, int first_length_va
|
|||
|
||||
TEST_ASSERT( totaloutlen == length );
|
||||
|
||||
TEST_ASSERT( 0 == memcmp(inbuf, decbuf, length) );
|
||||
TEST_ASSERT( 0 == timingsafe_bcmp(inbuf, decbuf, length) );
|
||||
|
||||
exit:
|
||||
mbedtls_cipher_free( &ctx_dec );
|
||||
|
@ -1158,7 +1158,7 @@ void test_decrypt_test_vec( int cipher_id, int pad_mode, data_t * key,
|
|||
if( 0 == finish_result && 0 == tag_result )
|
||||
{
|
||||
TEST_ASSERT( total_len == clear->len );
|
||||
TEST_ASSERT( 0 == memcmp( output, clear->x, clear->len ) );
|
||||
TEST_ASSERT( 0 == timingsafe_bcmp( output, clear->x, clear->len ) );
|
||||
}
|
||||
|
||||
exit:
|
||||
|
@ -1367,8 +1367,8 @@ void test_auth_crypt_tv( int cipher_id, data_t * key, data_t * iv,
|
|||
TEST_ASSERT( ret == 0 );
|
||||
|
||||
TEST_ASSERT( outlen == cipher->len + tag->len );
|
||||
TEST_ASSERT( memcmp( encrypt_buf, cipher->x, cipher->len ) == 0 );
|
||||
TEST_ASSERT( memcmp( encrypt_buf + cipher->len,
|
||||
TEST_ASSERT( timingsafe_bcmp( encrypt_buf, cipher->x, cipher->len ) == 0 );
|
||||
TEST_ASSERT( timingsafe_bcmp( encrypt_buf + cipher->len,
|
||||
tag->x, tag->len ) == 0 );
|
||||
|
||||
mbedtls_free( encrypt_buf );
|
||||
|
@ -1487,8 +1487,8 @@ void test_auth_crypt_tv( int cipher_id, data_t * key, data_t * iv,
|
|||
|
||||
TEST_ASSERT( outlen == cipher->len );
|
||||
if( cipher->len != 0 )
|
||||
TEST_ASSERT( memcmp( tmp_cipher, cipher->x, cipher->len ) == 0 );
|
||||
TEST_ASSERT( memcmp( tmp_tag, tag->x, tag->len ) == 0 );
|
||||
TEST_ASSERT( timingsafe_bcmp( tmp_cipher, cipher->x, cipher->len ) == 0 );
|
||||
TEST_ASSERT( timingsafe_bcmp( tmp_tag, tag->x, tag->len ) == 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1552,7 +1552,7 @@ void test_test_vec_ecb( int cipher_id, int operation, data_t * key,
|
|||
|
||||
/* check plaintext only if everything went fine */
|
||||
if( 0 == finish_result )
|
||||
TEST_ASSERT( 0 == memcmp( output, result->x,
|
||||
TEST_ASSERT( 0 == timingsafe_bcmp( output, result->x,
|
||||
mbedtls_cipher_get_block_size( &ctx ) ) );
|
||||
|
||||
exit:
|
||||
|
@ -1605,7 +1605,7 @@ void test_test_vec_crypt( int cipher_id, int operation, data_t *key,
|
|||
TEST_ASSERT( result->len == outlen );
|
||||
/* check plaintext only if everything went fine */
|
||||
if( 0 == finish_result )
|
||||
TEST_ASSERT( 0 == memcmp( output, result->x, outlen ) );
|
||||
TEST_ASSERT( 0 == timingsafe_bcmp( output, result->x, outlen ) );
|
||||
|
||||
exit:
|
||||
mbedtls_cipher_free( &ctx );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue