org.apache.james.mailet.crypto
Class KeyStoreHolder
java.lang.Object
org.apache.james.mailet.crypto.KeyStoreHolder
- public class KeyStoreHolder
- extends java.lang.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.
Field Summary |
protected java.security.KeyStore |
keyStore
|
Method Summary |
java.util.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 java.security.KeyStore keyStore
KeyStoreHolder
public KeyStoreHolder()
throws java.io.IOException,
java.security.GeneralSecurityException
KeyStoreHolder
public KeyStoreHolder(java.lang.String password)
throws java.io.IOException,
java.security.GeneralSecurityException
KeyStoreHolder
public KeyStoreHolder(java.lang.String keyStoreFileName,
java.lang.String keyStorePassword,
java.lang.String keyStoreType)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateException,
java.security.NoSuchProviderException,
java.io.IOException
verifySignatures
public java.util.List verifySignatures(org.bouncycastle.mail.smime.SMIMESigned signed)
throws java.lang.Exception,
javax.mail.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:
java.lang.Exception
javax.mail.MessagingException
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.