chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rsa1: rsa_loadpriv_core: Introduce rsapriv_load_ctx
[secnet.git]
/
pubkeys.fl.pl
diff --git
a/pubkeys.fl.pl
b/pubkeys.fl.pl
index 69cc3c925aee2ab249529d32d631c5cfb4f8f399..226f4ddbd319873e8e3da886cb55b003703d9deb 100755
(executable)
--- a/
pubkeys.fl.pl
+++ b/
pubkeys.fl.pl
@@
-134,6
+134,7
@@
L [ \t]*
S [ \t]+
BASE91S []-~!#-&(-[]+
%x SKIPNL
S [ \t]+
BASE91S []-~!#-&(-[]+
%x SKIPNL
+%x SYNTAXERR
%option yylineno
%option noyywrap
%option yylineno
%option noyywrap
@@
-267,7
+268,14
@@
static struct pubkeyset_context c[1];
<INITIAL><<EOF>> { return 0; }
<INITIAL><<EOF>> { return 0; }
-<*>. { FAIL("syntax error"); }
+<*>. {
+ yymore();
+ BEGIN(SYNTAXERR);
+}
+<SYNTAXERR>.* {
+ slilog(LI,M_DEBUG,"pubkeys syntax error at `%s'", yytext);
+ FAIL("syntax error");
+}
<*>\n { FAIL("syntax error - unexpected newline"); }
<<EOF>> { FAIL("syntax error - unexpected eof"); }
<*>\n { FAIL("syntax error - unexpected newline"); }
<<EOF>> { FAIL("syntax error - unexpected eof"); }
@@
-303,10
+311,6
@@
keyset_load(const char *path, struct buffer_if *data_buf,
int r=pkyylex();
if (r) goto err_bad;
int r=pkyylex();
if (r) goto err_bad;
- if (!c->had_serial) {
- slilog(LI,M_ERR,"missing serial number in %s",path);
- goto err_bad;
- }
if (!c->building->nkeys) {
slilog(LI,M_ERR,"no useable keys in %s",path);
goto err_bad;
if (!c->building->nkeys) {
slilog(LI,M_ERR,"no useable keys in %s",path);
goto err_bad;