1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-10-20 03:32:32 +03:00

Merge pull request #10362 from bjwtaylor/mbedtls_x509write_crt_set_serial_raw

Add const to serial argument in mbedtls_x509write_crt_set_serial_raw
This commit is contained in:
David Horstmann
2025-08-21 10:54:07 +00:00
committed by GitHub
3 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
API changes
* Change the serial argument of the mbedtls_x509write_crt_set_serial_raw
function to a const to align with the rest of the API.

View File

@@ -956,7 +956,7 @@ void mbedtls_x509write_crt_set_version(mbedtls_x509write_cert *ctx, int version)
* is too big (longer than MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN)
*/
int mbedtls_x509write_crt_set_serial_raw(mbedtls_x509write_cert *ctx,
unsigned char *serial, size_t serial_len);
const unsigned char *serial, size_t serial_len);
/**
* \brief Set the validity period for a Certificate

View File

@@ -94,7 +94,7 @@ int mbedtls_x509write_crt_set_issuer_name(mbedtls_x509write_cert *ctx,
}
int mbedtls_x509write_crt_set_serial_raw(mbedtls_x509write_cert *ctx,
unsigned char *serial, size_t serial_len)
const unsigned char *serial, size_t serial_len)
{
if (serial_len > MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN) {
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;