mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-21 14:53:42 +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:
3
ChangeLog.d/x509write_crt_set_serial_raw-alignment.txt
Normal file
3
ChangeLog.d/x509write_crt_set_serial_raw-alignment.txt
Normal 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.
|
@@ -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)
|
* is too big (longer than MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN)
|
||||||
*/
|
*/
|
||||||
int mbedtls_x509write_crt_set_serial_raw(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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set the validity period for a Certificate
|
* \brief Set the validity period for a Certificate
|
||||||
|
@@ -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,
|
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) {
|
if (serial_len > MBEDTLS_X509_RFC5280_MAX_SERIAL_LEN) {
|
||||||
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;
|
return MBEDTLS_ERR_X509_BAD_INPUT_DATA;
|
||||||
|
Reference in New Issue
Block a user