x509: Evaluate return codes of parsing functions
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2002 Ueli Galizzi, Ariane Seiler
|
||||
* Copyright (C) 2003 Martin Berner, Lukas Suter
|
||||
* Copyright (C) 2002-2014 Andreas Steffen
|
||||
* Copyright (C) 2002-2017 Andreas Steffen
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
*
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -177,7 +176,7 @@ static chunk_t ASN1_noRevAvail_ext = chunk_from_chars(
|
||||
/**
|
||||
* declaration of function implemented in x509_cert.c
|
||||
*/
|
||||
extern void x509_parse_generalNames(chunk_t blob, int level0, bool implicit,
|
||||
extern bool x509_parse_generalNames(chunk_t blob, int level0, bool implicit,
|
||||
linked_list_t *list);
|
||||
/**
|
||||
* parses a directoryName
|
||||
@@ -191,7 +190,11 @@ static bool parse_directoryName(chunk_t blob, int level, bool implicit,
|
||||
linked_list_t *list;
|
||||
|
||||
list = linked_list_create();
|
||||
x509_parse_generalNames(blob, level, implicit, list);
|
||||
if (!x509_parse_generalNames(blob, level, implicit, list))
|
||||
{
|
||||
list->destroy(list);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
enumerator = list->create_enumerator(list);
|
||||
while (enumerator->enumerate(enumerator, &directoryName))
|
||||
|
||||
Reference in New Issue
Block a user