S [ \t]+
BASE91S []-~!#-&(-[]+
%x SKIPNL
+%x SYNTAXERR
%option yylineno
%option noyywrap
if (c->building->nkeys >= MAX_SIG_KEYS) DOSKIP("too many public keys");
struct sigpubkey_if *pubkey;
bool_t ok=c->scheme->loadpub(c->scheme,c->data_buf,
- &pubkey,c->log);
+ &pubkey,c->log,c->loc);
if (!ok) break;
memcpy(c->building->keys[c->building->nkeys].id.b,
c->grpid,
<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"); }
if (!pkyyin) {
slilog(LI,
errno==ENOENT ? logcl_enoent : M_ERR,
- "could not open keyset file %s: %s",
+ "%scould not open keyset file %s: %s",
+ logcl_enoent==M_DEBUG && errno==ENOENT ? "expectedly " : "",
path,strerror(errno));
goto err;
}
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;