1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Make sig_opts non-optional in X509 structures

This simplifies the code.
This commit is contained in:
Manuel Pégourié-Gonnard
2014-06-05 17:07:30 +02:00
parent dddbb1d1eb
commit bf696d030b
8 changed files with 8 additions and 34 deletions

View File

@ -626,11 +626,6 @@ int x509_crl_info( char *buf, size_t size, const char *prefix,
size_t n;
char *p;
const x509_crl_entry *entry;
#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES)
const void *sig_opts = crl->sig_opts;
#else
const void *sig_opts = NULL;
#endif
p = buf;
n = size;
@ -687,7 +682,7 @@ int x509_crl_info( char *buf, size_t size, const char *prefix,
SAFE_SNPRINTF();
ret = x509_sig_alg_gets( p, n, &crl->sig_oid1, crl->sig_pk, crl->sig_md,
sig_opts );
crl->sig_opts );
SAFE_SNPRINTF();
ret = snprintf( p, n, "\n" );

View File

@ -1253,11 +1253,6 @@ int x509_crt_info( char *buf, size_t size, const char *prefix,
size_t n;
char *p;
char key_size_str[BEFORE_COLON];
#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES)
const void *sig_opts = crt->sig_opts;
#else
const void *sig_opts = NULL;
#endif
p = buf;
n = size;
@ -1300,7 +1295,7 @@ int x509_crt_info( char *buf, size_t size, const char *prefix,
SAFE_SNPRINTF();
ret = x509_sig_alg_gets( p, n, &crt->sig_oid1, crt->sig_pk,
crt->sig_md, sig_opts );
crt->sig_md, crt->sig_opts );
SAFE_SNPRINTF();
/* Key size */

View File

@ -366,11 +366,6 @@ int x509_csr_info( char *buf, size_t size, const char *prefix,
size_t n;
char *p;
char key_size_str[BEFORE_COLON];
#if defined(POLARSSL_RSASSA_PSS_CERTIFICATES)
const void *sig_opts = csr->sig_opts;
#else
const void *sig_opts = NULL;
#endif
p = buf;
n = size;
@ -388,7 +383,7 @@ int x509_csr_info( char *buf, size_t size, const char *prefix,
SAFE_SNPRINTF();
ret = x509_sig_alg_gets( p, n, &csr->sig_oid, csr->sig_pk, csr->sig_md,
sig_opts );
csr->sig_opts );
SAFE_SNPRINTF();
if( ( ret = x509_key_size_helper( key_size_str, BEFORE_COLON,