Lines Matching refs:output_buf
555 unsigned char *output_buf = NULL; in mbedtls_pk_write_pubkey_pem() local
556 output_buf = mbedtls_calloc(1, PUB_DER_MAX_BYTES); in mbedtls_pk_write_pubkey_pem()
557 if (output_buf == NULL) { in mbedtls_pk_write_pubkey_pem()
562 if ((ret = mbedtls_pk_write_pubkey_der(key, output_buf, in mbedtls_pk_write_pubkey_pem()
568 output_buf + PUB_DER_MAX_BYTES - ret, in mbedtls_pk_write_pubkey_pem()
575 mbedtls_free(output_buf); in mbedtls_pk_write_pubkey_pem()
582 unsigned char *output_buf = NULL; in mbedtls_pk_write_key_pem() local
583 output_buf = mbedtls_calloc(1, PRV_DER_MAX_BYTES); in mbedtls_pk_write_key_pem()
584 if (output_buf == NULL) { in mbedtls_pk_write_key_pem()
590 if ((ret = mbedtls_pk_write_key_der(key, output_buf, PRV_DER_MAX_BYTES)) < 0) { in mbedtls_pk_write_key_pem()
617 output_buf + PRV_DER_MAX_BYTES - ret, in mbedtls_pk_write_key_pem()
624 mbedtls_zeroize_and_free(output_buf, PRV_DER_MAX_BYTES); in mbedtls_pk_write_key_pem()