Inline peer-fingerprint blocks can benefit from a bit of structuring
by indentation or by putting comments ("# this is Alice's key").
v2: accept ';' and '#' as comment delimiter. Fix tab-indent.
v3: we want ==
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <
20210519133415.28627-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22404.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
const char *line;
while ((line = strsep(&lines, "\n")))
{
- /* skip empty lines */
- if (strlen(line) == 0)
+ /* ignore leading whitespace */
+ while(isspace(*line))
+ {
+ line++;
+ }
+ /* skip empty lines and comment lines */
+ if (strlen(line) == 0 || *line == '#' || *line == ';')
{
continue;
}