Change default token from InternalCryptoToken to InternalKeyStorageToken.

This commit is contained in:
nicolson%netscape.com 2002-01-30 20:38:53 +00:00
Родитель 4c0174c4b5
Коммит 15e0a8e116
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -51,7 +51,7 @@ import org.mozilla.jss.CRLImportException;
* Initialization is done with static methods, and must be done before
* an instance can be created. All other operations are done with instance
* methods.
* @version $Revision: 1.11 $ $Date: 2002/01/24 01:24:01 $
* @version $Revision: 1.12 $ $Date: 2002/01/30 20:38:53 $
*/
public final class CryptoManager implements TokenSupplier
{
@ -1278,12 +1278,12 @@ public final class CryptoManager implements TokenSupplier
* be used when JSS is called through the JCA interface, which has
* no means of specifying which token to use.
*
* <p>If no token is set, the InternalCryptoToken will be used. Setting
* <p>If no token is set, the InternalKeyStorageToken will be used. Setting
* this thread's token to <tt>null</tt> will also cause the
* InternalCryptoToken to be used.
* InternalKeyStorageToken to be used.
*
* @param The token to use for crypto operations. Specifying <tt>null</tt>
* will cause the InternalCryptoToken to be used.
* will cause the InternalKeyStorageToken to be used.
*/
public void setThreadToken(CryptoToken token) {
if( token != null ) {
@ -1298,18 +1298,18 @@ public final class CryptoManager implements TokenSupplier
* be used when JSS is called through the JCA interface, which has
* no means of specifying which token to use.
*
* <p>If no token is set, the InternalCryptoToken will be used. Setting
* <p>If no token is set, the InternalKeyStorageToken will be used. Setting
* this thread's token to <tt>null</tt> will also cause the
* InternalCryptoToken to be used.
* InternalKeyStorageToken to be used.
*
* @return The default token for this thread. If it has not been specified,
* it will be the InternalCryptoToken.
* it will be the InternalKeyStorageToken.
*/
public CryptoToken getThreadToken() {
CryptoToken tok =
(CryptoToken) perThreadTokenTable.get(Thread.currentThread());
if( tok == null ) {
tok = getInternalCryptoToken();
tok = getInternalKeyStorageToken();
}
return tok;
}