chiark / gitweb /
priv-cache etc.: private key algorithm is specified in key id
The idea that we would try various different algorithms to see who
could load a private key was a remnant of a previous design of key id
system. The actually implemnted arrangements identify the algorithm
in the key id, so there is no need for probing.
In this commit we fix the spec, and change the calling convention for
loadpriv. Now that we only call loadpriv once, it is allowed to
modify the buffer contents (although nothing makes use of this
relaxation right now).
We change loadpriv's one call site in privcache.c and its (currently
only) implementation, in rsa.c.
In privcache, the error message now definitely means that the algid
was unrecognised, so change it.
In rsa.c we make the log level M_ERR unconditionally (although in fact
verror_tryload now always gets unsup==0). We delete the now-unused
LDUNSUP from rsa.c, but there is some more intrusive refactoring to do
next to tidy up now-unused stuff.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>