]> git.ipfire.org Git - thirdparty/krb5.git/commit
In PKINIT NSS crypto, support encrypted PEM keys
authorNalin Dahyabhai <nalin@dahyabhai.net>
Wed, 24 Apr 2013 19:29:27 +0000 (15:29 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 13 May 2013 05:59:35 +0000 (01:59 -0400)
commitf190b7abe307a005b9f58a634c53d06a3a3381ee
tree55c1f46ad3a7205c48c5850fda8650ee53414b6e
parent9d429bb8a78060334d2a533723fe549c72cba68e
In PKINIT NSS crypto, support encrypted PEM keys

When the PEM module is given an encrypted key, it changes its token
flags to indicate that a password is required (by setting needs-login)
to signal the application that we need to supply a password to decrypt
it.  Attempts to load any other items will fail until the flag is
cleared.

If we detect that the flag is set after we've attempted to load a
private key, attempt to "log in" to the "token" using a password.  Even
if we fail, the token will reset its needs-login flag, which is
necessary before we can import anything else.
src/plugins/preauth/pkinit/pkinit_crypto_nss.c