Lines Matching refs:n
61 static void mbedtls_zeroize( void *v, size_t n ) { in mbedtls_zeroize() argument
62 volatile unsigned char *p = v; while( n-- ) *p++ = 0; in mbedtls_zeroize()
72 int ret, n; in dhm_read_bignum() local
77 n = ( (*p)[0] << 8 ) | (*p)[1]; in dhm_read_bignum()
80 if( (int)( end - *p ) < n ) in dhm_read_bignum()
83 if( ( ret = mbedtls_mpi_read_binary( X, *p, n ) ) != 0 ) in dhm_read_bignum()
86 (*p) += n; in dhm_read_bignum()
190 #define DHM_MPI_EXPORT(X,n) \ in mbedtls_dhm_make_params() argument
191 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, p + 2, n ) ); \ in mbedtls_dhm_make_params()
192 *p++ = (unsigned char)( n >> 8 ); \ in mbedtls_dhm_make_params()
193 *p++ = (unsigned char)( n ); p += n; in mbedtls_dhm_make_params()
517 static int load_file( const char *path, unsigned char **buf, size_t *n ) in load_file() argument
533 *n = (size_t) size; in load_file()
535 if( *n + 1 == 0 || in load_file()
536 ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) in load_file()
542 if( fread( *buf, 1, *n, f ) != *n ) in load_file()
551 (*buf)[*n] = '\0'; in load_file()
554 ++*n; in load_file()
565 size_t n; in mbedtls_dhm_parse_dhmfile() local
568 if( ( ret = load_file( path, &buf, &n ) ) != 0 ) in mbedtls_dhm_parse_dhmfile()
571 ret = mbedtls_dhm_parse_dhm( dhm, buf, n ); in mbedtls_dhm_parse_dhmfile()
573 mbedtls_zeroize( buf, n ); in mbedtls_dhm_parse_dhmfile()