diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-01-21 17:36:27 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-01-21 17:36:27 +0000 |
commit | 1fafacc7d8a541638c8b363103623af4e105279a (patch) | |
tree | 61a02f537637a0aad0fb6238030d757341c38586 /lib/gnutls_algorithms.c | |
parent | e86c2c999b47e79f6df5c90874b7d138350f252b (diff) | |
download | gnutls-1fafacc7d8a541638c8b363103623af4e105279a.tar.gz |
some cleanups.
Diffstat (limited to 'lib/gnutls_algorithms.c')
-rw-r--r-- | lib/gnutls_algorithms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c index a46c525049..6170ec1575 100644 --- a/lib/gnutls_algorithms.c +++ b/lib/gnutls_algorithms.c @@ -171,7 +171,7 @@ static const gnutls_hash_entry hash_algorithms[] = { {"MD5", OID_MD5, GNUTLS_MAC_MD5}, {"MD2", OID_MD2, 0/*GNUTLS_MAC_MD2*/}, {"RIPEMD160", OID_RMD160, GNUTLS_MAC_RMD160}, - {"NULL", "", GNUTLS_MAC_NULL}, + {"NULL", NULL, GNUTLS_MAC_NULL}, {0, 0, 0} }; @@ -1484,9 +1484,11 @@ const char *_gnutls_x509_sign_to_oid(gnutls_pk_algorithm_t pk, gnutls_mac_algorithm_t mac) { gnutls_sign_algorithm_t sign; -const char* ret; +const char* ret = NULL; sign = _gnutls_x509_pk_to_sign(pk, mac); + if (sign == GNUTLS_SIGN_UNKNOWN) + return NULL; GNUTLS_SIGN_ALG_LOOP(ret=p->oid); return ret; |