Home
last modified time | relevance | path

Searched refs:output_buf (Results 1 – 6 of 6) sorted by relevance

/mbedtls-3.7.0/programs/pkey/
Dkey_app_writer.c96 unsigned char output_buf[16000]; in write_public_key() local
97 unsigned char *c = output_buf; in write_public_key()
100 memset(output_buf, 0, 16000); in write_public_key()
104 if ((ret = mbedtls_pk_write_pubkey_pem(key, output_buf, 16000)) != 0) { in write_public_key()
108 len = strlen((char *) output_buf); in write_public_key()
112 if ((ret = mbedtls_pk_write_pubkey_der(key, output_buf, 16000)) < 0) { in write_public_key()
117 c = output_buf + sizeof(output_buf) - len; in write_public_key()
138 unsigned char output_buf[16000]; in write_private_key() local
139 unsigned char *c = output_buf; in write_private_key()
142 memset(output_buf, 0, 16000); in write_private_key()
[all …]
Dgen_key.c126 unsigned char output_buf[16000]; in write_private_key() local
127 unsigned char *c = output_buf; in write_private_key()
130 memset(output_buf, 0, 16000); in write_private_key()
132 if ((ret = mbedtls_pk_write_key_pem(key, output_buf, 16000)) != 0) { in write_private_key()
136 len = strlen((char *) output_buf); in write_private_key()
138 if ((ret = mbedtls_pk_write_key_der(key, output_buf, 16000)) < 0) { in write_private_key()
143 c = output_buf + sizeof(output_buf) - len; in write_private_key()
/mbedtls-3.7.0/library/
Dpkwrite.c547 unsigned char *output_buf = NULL; in mbedtls_pk_write_pubkey_pem() local
548 output_buf = mbedtls_calloc(1, PUB_DER_MAX_BYTES); in mbedtls_pk_write_pubkey_pem()
549 if (output_buf == NULL) { in mbedtls_pk_write_pubkey_pem()
554 if ((ret = mbedtls_pk_write_pubkey_der(key, output_buf, in mbedtls_pk_write_pubkey_pem()
560 output_buf + PUB_DER_MAX_BYTES - ret, in mbedtls_pk_write_pubkey_pem()
567 mbedtls_free(output_buf); in mbedtls_pk_write_pubkey_pem()
574 unsigned char *output_buf = NULL; in mbedtls_pk_write_key_pem() local
575 output_buf = mbedtls_calloc(1, PRV_DER_MAX_BYTES); in mbedtls_pk_write_key_pem()
576 if (output_buf == NULL) { in mbedtls_pk_write_key_pem()
582 if ((ret = mbedtls_pk_write_key_der(key, output_buf, PRV_DER_MAX_BYTES)) < 0) { in mbedtls_pk_write_key_pem()
[all …]
/mbedtls-3.7.0/programs/x509/
Dcert_req.c116 unsigned char output_buf[4096]; in write_certificate_request() local
119 memset(output_buf, 0, 4096); in write_certificate_request()
120 if ((ret = mbedtls_x509write_csr_pem(req, output_buf, 4096, f_rng, p_rng)) < 0) { in write_certificate_request()
124 len = strlen((char *) output_buf); in write_certificate_request()
130 if (fwrite(output_buf, 1, len, f) != len) { in write_certificate_request()
Dcert_write.c213 unsigned char output_buf[4096]; in write_certificate() local
217 memset(output_buf, 0, 4096); in write_certificate()
219 ret = mbedtls_x509write_crt_der(crt, output_buf, 4096, in write_certificate()
226 output_start = output_buf + 4096 - len; in write_certificate()
228 ret = mbedtls_x509write_crt_pem(crt, output_buf, 4096, in write_certificate()
234 len = strlen((char *) output_buf); in write_certificate()
235 output_start = output_buf; in write_certificate()
/mbedtls-3.7.0/tests/suites/
Dtest_suite_rsa.function1410 unsigned char *output_buf = NULL;
1416 TEST_CALLOC(output_buf, input->len);
1417 output_end = output_buf + input->len;
1420 /* Parse the key and write it back to output_buf. */
1423 TEST_EQUAL(mbedtls_rsa_write_pubkey(&rsa_ctx, output_buf, &output_p), input->len);
1426 TEST_EQUAL(mbedtls_rsa_write_key(&rsa_ctx, output_buf, &output_p), input->len);
1434 mbedtls_free(output_buf);