Lines Matching refs:buf

138                                unsigned char *buf, size_t buflen,  in pem_des_decrypt()  argument
150 des_iv, buf, buf ); in pem_des_decrypt()
160 unsigned char *buf, size_t buflen, in pem_des3_decrypt() argument
172 des3_iv, buf, buf ); in pem_des3_decrypt()
184 unsigned char *buf, size_t buflen, in pem_aes_decrypt() argument
196 aes_iv, buf, buf ); in pem_aes_decrypt()
212 unsigned char *buf; in mbedtls_pem_read_buffer() local
327 if( ( buf = mbedtls_calloc( 1, len ) ) == NULL ) in mbedtls_pem_read_buffer()
330 if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) in mbedtls_pem_read_buffer()
332 mbedtls_free( buf ); in mbedtls_pem_read_buffer()
342 mbedtls_free( buf ); in mbedtls_pem_read_buffer()
348 pem_des3_decrypt( pem_iv, buf, len, pwd, pwdlen ); in mbedtls_pem_read_buffer()
350 pem_des_decrypt( pem_iv, buf, len, pwd, pwdlen ); in mbedtls_pem_read_buffer()
355 pem_aes_decrypt( pem_iv, 16, buf, len, pwd, pwdlen ); in mbedtls_pem_read_buffer()
357 pem_aes_decrypt( pem_iv, 24, buf, len, pwd, pwdlen ); in mbedtls_pem_read_buffer()
359 pem_aes_decrypt( pem_iv, 32, buf, len, pwd, pwdlen ); in mbedtls_pem_read_buffer()
368 if( len <= 2 || buf[0] != 0x30 || buf[1] > 0x83 ) in mbedtls_pem_read_buffer()
370 mbedtls_free( buf ); in mbedtls_pem_read_buffer()
374 mbedtls_free( buf ); in mbedtls_pem_read_buffer()
380 ctx->buf = buf; in mbedtls_pem_read_buffer()
388 mbedtls_free( ctx->buf ); in mbedtls_pem_free()
398 unsigned char *buf, size_t buf_len, size_t *olen ) in mbedtls_pem_write_buffer() argument
401 unsigned char *encode_buf, *c, *p = buf; in mbedtls_pem_write_buffer()
441 *olen = p - buf; in mbedtls_pem_write_buffer()