org.metastatic.jessie

Interface SRPTrustManager

All Superinterfaces:
TrustManager

public interface SRPTrustManager
extends TrustManager

A trust manager for secure remote password (SRP) key exchange cipher suites. This is a read-only interface to the gnu.crypto.sasl.srp.PasswordFile class, with convenience methods to generate session key pairs.

Method Summary

boolean
contains(String user)
Tests if the configured password file contains the specified user name.
KeyPair
getKeyPair(String user)
Create and return a session SRP key pair for the given user name.
PasswordFile
getPasswordFile()
Returns a reference to the SRP PasswordFile used by this TrustManager.
byte[]
getSalt(String user)
Returns the salt value for the given user.
BigInteger
getVerifier(String user)
Returns the password verifier for the given user.

Method Details

contains

public boolean contains(String user)
Tests if the configured password file contains the specified user name.
Parameters:
user - The user name.
Returns:
True if the password file has an entry for user

getKeyPair

public KeyPair getKeyPair(String user)
Create and return a session SRP key pair for the given user name.
Parameters:
user - The user name to generate the key pair for.
Returns:
The session key pair, or null if there is no entry for user.

getPasswordFile

public PasswordFile getPasswordFile()
Returns:
a reference to the SRP password file in use.

getSalt

public byte[] getSalt(String user)
Returns the salt value for the given user.
Parameters:
user - The user name.
Returns:
The salt for user's entry, or null.

getVerifier

public BigInteger getVerifier(String user)
Returns the password verifier for the given user.
Parameters:
user - The user name.
Returns:
user's password verifier, or null.