mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:05:36 +01:00
- Corrected removal of leading '00:' in printing serial numbers in certificates and CRLs
This commit is contained in:
parent
6bcfc67cd2
commit
c8ffbe7706
@ -53,6 +53,8 @@ Bugfix
|
|||||||
appended with '....' after first 28 octets
|
appended with '....' after first 28 octets
|
||||||
* Improved build support for s390x and sparc64 in bignum.h
|
* Improved build support for s390x and sparc64 in bignum.h
|
||||||
* Fixed MS Visual C++ name clash with int64 in sha4.h
|
* Fixed MS Visual C++ name clash with int64 in sha4.h
|
||||||
|
* Corrected removal of leading '00:' in printing serial numbers in
|
||||||
|
certificates and CRLs
|
||||||
|
|
||||||
= Version 1.0.0 released on 2011-07-27
|
= Version 1.0.0 released on 2011-07-27
|
||||||
Features
|
Features
|
||||||
|
@ -2426,6 +2426,9 @@ int x509parse_serial_gets( char *buf, size_t size, const x509_buf *serial )
|
|||||||
|
|
||||||
for( i = 0; i < nr; i++ )
|
for( i = 0; i < nr; i++ )
|
||||||
{
|
{
|
||||||
|
if( i == 0 && serial->p[i] == 0x0 )
|
||||||
|
continue;
|
||||||
|
|
||||||
ret = snprintf( p, n, "%02X%s",
|
ret = snprintf( p, n, "%02X%s",
|
||||||
serial->p[i], ( i < nr - 1 ) ? ":" : "" );
|
serial->p[i], ( i < nr - 1 ) ? ":" : "" );
|
||||||
SAFE_SNPRINTF();
|
SAFE_SNPRINTF();
|
||||||
@ -2589,7 +2592,7 @@ int x509parse_crl_info( char *buf, size_t size, const char *prefix,
|
|||||||
const x509_crl *crl )
|
const x509_crl *crl )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t i, n, nr;
|
size_t n;
|
||||||
char *p;
|
char *p;
|
||||||
const x509_crl_entry *entry;
|
const x509_crl_entry *entry;
|
||||||
|
|
||||||
@ -2631,22 +2634,15 @@ int x509parse_crl_info( char *buf, size_t size, const char *prefix,
|
|||||||
prefix );
|
prefix );
|
||||||
SAFE_SNPRINTF();
|
SAFE_SNPRINTF();
|
||||||
|
|
||||||
nr = ( entry->serial.len <= 32 )
|
ret = x509parse_serial_gets( p, n, &entry->serial);
|
||||||
? entry->serial.len : 32;
|
SAFE_SNPRINTF();
|
||||||
|
|
||||||
for( i = 0; i < nr; i++ )
|
|
||||||
{
|
|
||||||
ret = snprintf( p, n, "%02X%s",
|
|
||||||
entry->serial.p[i], ( i < nr - 1 ) ? ":" : "" );
|
|
||||||
SAFE_SNPRINTF();
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = snprintf( p, n, " revocation date: " \
|
ret = snprintf( p, n, " revocation date: " \
|
||||||
"%04d-%02d-%02d %02d:%02d:%02d",
|
"%04d-%02d-%02d %02d:%02d:%02d",
|
||||||
entry->revocation_date.year, entry->revocation_date.mon,
|
entry->revocation_date.year, entry->revocation_date.mon,
|
||||||
entry->revocation_date.day, entry->revocation_date.hour,
|
entry->revocation_date.day, entry->revocation_date.hour,
|
||||||
entry->revocation_date.min, entry->revocation_date.sec );
|
entry->revocation_date.min, entry->revocation_date.sec );
|
||||||
SAFE_SNPRINTF();
|
SAFE_SNPRINTF();
|
||||||
|
|
||||||
entry = entry->next;
|
entry = entry->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user