mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 16:14:15 +01:00
Merge remote-tracking branch 'public/pr/1819' into mbedtls-2.7
This commit is contained in:
commit
db060a8da2
@ -3,6 +3,8 @@ mbed TLS ChangeLog (Sorted per branch, date)
|
||||
= mbed TLS x.x.x branch released xxxx-xx-xx
|
||||
|
||||
Bugfix
|
||||
* Fix compilation error on C++, because of a variable named new.
|
||||
Found and fixed by Hirotaka Niisato in #1783.
|
||||
* Change the shebang line in Perl scripts to look up perl in the PATH.
|
||||
Contributed by fbrosson in #1533.
|
||||
* Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber,
|
||||
|
@ -6017,27 +6017,27 @@ static int ssl_append_key_cert( mbedtls_ssl_key_cert **head,
|
||||
mbedtls_x509_crt *cert,
|
||||
mbedtls_pk_context *key )
|
||||
{
|
||||
mbedtls_ssl_key_cert *new;
|
||||
mbedtls_ssl_key_cert *new_cert;
|
||||
|
||||
new = mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) );
|
||||
if( new == NULL )
|
||||
new_cert = mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) );
|
||||
if( new_cert == NULL )
|
||||
return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
|
||||
|
||||
new->cert = cert;
|
||||
new->key = key;
|
||||
new->next = NULL;
|
||||
new_cert->cert = cert;
|
||||
new_cert->key = key;
|
||||
new_cert->next = NULL;
|
||||
|
||||
/* Update head is the list was null, else add to the end */
|
||||
if( *head == NULL )
|
||||
{
|
||||
*head = new;
|
||||
*head = new_cert;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbedtls_ssl_key_cert *cur = *head;
|
||||
while( cur->next != NULL )
|
||||
cur = cur->next;
|
||||
cur->next = new;
|
||||
cur->next = new_cert;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user