diff options
Diffstat (limited to 'lib/algorithms/publickey.c')
-rw-r--r-- | lib/algorithms/publickey.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/algorithms/publickey.c b/lib/algorithms/publickey.c index 0bd8f0fbae..59d28af956 100644 --- a/lib/algorithms/publickey.c +++ b/lib/algorithms/publickey.c @@ -314,6 +314,9 @@ const char *gnutls_pk_get_oid(gnutls_pk_algorithm_t algorithm) const char *ret = NULL; const gnutls_pk_entry *p; + if (algorithm == 0) + return NULL; + for (p = pk_algorithms; p->name != NULL; p++) if (p->id == algorithm) { ret = p->oid; |