org.apache.james.security
Class KeyStoreHolder
java.lang.Object
org.apache.james.security.KeyStoreHolder
- public class KeyStoreHolder
- extends Object
This class is used to handle in a simple way a keystore that contains a set
of trusted certificates. It loads the set from the specified keystore (type,
location and password are supplied during the object's creation) and it is
able to verify a s/mime signature, also checking if the signer's certificate
is trusted or not.
Method Summary |
List |
verifySignatures(org.bouncycastle.mail.smime.SMIMESigned signed)
Verifies the signature of a SMIME message.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyStore
protected KeyStore keyStore
KeyStoreHolder
public KeyStoreHolder()
throws IOException,
GeneralSecurityException
KeyStoreHolder
public KeyStoreHolder(String password)
throws IOException,
GeneralSecurityException
KeyStoreHolder
public KeyStoreHolder(String keyStoreFileName,
String keyStorePassword,
String keyStoreType)
throws KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
NoSuchProviderException,
IOException
verifySignatures
public List verifySignatures(org.bouncycastle.mail.smime.SMIMESigned signed)
throws Exception,
MessagingException
- Verifies the signature of a SMIME message.
It checks also if the signer's certificate is trusted using the loaded
keystore as trusted certificate store.
- Parameters:
signed
- the signed mail to check.
- Returns:
- a list of SMIMESignerInfo which keeps the data of each mail
signer.
- Throws:
Exception
MessagingException
"Copyright © 1999-2006 Apache Jakarta Project. All Rights Reserved."