- scheme++) {
- st->databuf.start=st->databuf.base;
- st->databuf.size=got;
- ok=scheme->loadpriv(scheme, &st->databuf, &sigpriv, log);
- if (ok) {
- if (sigpriv->sethash) {
- if (!st->defhash) {
- slilog(log,M_ERR,
+ scheme++)
+ if (scheme->algid == id->b[GRPIDSZ])
+ goto found;
+
+ slilog(log,M_ERR,"private key file %s not loaded (unknown algid)",
+ st->path.buffer);
+ goto out;
+
+ found:
+ st->databuf.start=st->databuf.base;
+ st->databuf.size=got;
+ struct cloc loc = { .file=st->path.buffer, .line=0 };
+ ok=scheme->loadpriv(scheme, &st->databuf, &sigpriv, log, loc);
+ if (!ok) goto out; /* loadpriv will have logged */
+
+ if (sigpriv->sethash) {
+ if (!st->defhash) {
+ slilog(log,M_ERR,