Lines Matching refs:bad
473 unsigned char padding_len, bad = 0; in get_pkcs_padding() local
482 bad |= padding_len > input_len; in get_pkcs_padding()
483 bad |= padding_len == 0; in get_pkcs_padding()
489 bad |= ( input[i] ^ padding_len ) * ( i >= pad_idx ); in get_pkcs_padding()
491 return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); in get_pkcs_padding()
514 unsigned char done = 0, prev_done, bad; in get_one_and_zeros_padding() local
519 bad = 0xFF; in get_one_and_zeros_padding()
526 bad &= ( input[i-1] ^ 0x80 ) | ( done == prev_done ); in get_one_and_zeros_padding()
529 return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); in get_one_and_zeros_padding()
553 unsigned char padding_len, bad = 0; in get_zeros_and_len_padding() local
562 bad |= padding_len > input_len; in get_zeros_and_len_padding()
563 bad |= padding_len == 0; in get_zeros_and_len_padding()
568 bad |= input[i] * ( i >= pad_idx ); in get_zeros_and_len_padding()
570 return( MBEDTLS_ERR_CIPHER_INVALID_PADDING * ( bad != 0 ) ); in get_zeros_and_len_padding()