|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.taglibs.mailer2.PartTag
org.apache.taglibs.mailer2.MailTag
org.apache.taglibs.mailer2.SignTag
JSP tag mt:sign is used to S/MIME sign a previously stored message.
| Field Summary |
| Fields inherited from class org.apache.taglibs.mailer2.MailTag |
FROM, PASSWORD, PORT, SERVER, username, USERNAME, VERSION |
| Fields inherited from class org.apache.taglibs.mailer2.PartTag |
log |
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
SignTag()
Default zero-arg constructor. |
|
| Method Summary | |
int |
doEndTag()
|
String |
getAlias()
Returns the private key alias. |
String |
getKeystore()
Get the keystore attribute. |
MimeMessage |
getMessage()
Returns the javax.mail.internet.MimeMessage object to sign. |
String |
getStorepass()
Returns the password to open the keystore. |
String |
getStoretype()
Returns the type of keystore, e.g. |
KeyStore |
loadKeystore(String storeType,
String keystoreFilename,
String storepass)
Load a keystore file. |
void |
release()
|
void |
setAlias(String alias)
Sets the alias of the private key to retrieve from the keystore. |
void |
setKeystore(String keystore)
Sets the location of the keystore. |
void |
setMessage(MimeMessage message)
Sets the message attribute. |
void |
setStorepass(String storepass)
Sets the password to open the keystore. |
void |
setStoretype(String storetype)
Sets the type of keystore. |
protected MimeMessage |
signMessage(MimeMessage message,
X509Certificate cert,
PrivateKey privateKey)
Returns a signed message. |
| Methods inherited from class org.apache.taglibs.mailer2.MailTag |
addRecipient, addReplyTo, doAfterBody, doStartTag, getBcc, getCc, getFrom, getImportance, getMimemessage, getPassword, getPort, getReplyto, getScope, getScopeType, getServer, getSession, getSessionObject, getSubject, getTo, getUsername, getVar, isBackground, setBackground, setBcc, setCc, setFrom, setImportance, setMimemessage, setPassword, setPort, setReplyto, setScope, setServer, setSession, setSubject, setTo, setUsername, setVar |
| Methods inherited from class org.apache.taglibs.mailer2.PartTag |
addPart, constructMessage, getBody, getContentType, getEncoding, getHeaders, getParts, getType, setBody, setEncoding, setHeader, setType |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, resetCustomAttributes, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
| Constructor Detail |
public SignTag()
| Method Detail |
public int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class MailTagJspException
protected MimeMessage signMessage(MimeMessage message,
X509Certificate cert,
PrivateKey privateKey)
throws JspException
message - The message to signcert - The certificate to useprivateKey - The private key to sign with
JspExceptionpublic void release()
release in interface Tagrelease in class MailTag
public KeyStore loadKeystore(String storeType,
String keystoreFilename,
String storepass)
throws GeneralSecurityException,
IOException
storeType - The type of keystore, e.g. "PKCS12", "JKS", etc.keystoreFilename - The name of the keystore filestorepass - The password to open the keystore
GeneralSecurityException - if the keystore cannot be read
IOException - if the keystore cannot be foundpublic String getAlias()
public void setAlias(String alias)
alias - The private key aliaspublic String getKeystore()
public void setKeystore(String keystore)
keystore - The location of the keystorepublic MimeMessage getMessage()
public void setMessage(MimeMessage message)
message - The Message to sendpublic String getStorepass()
public void setStorepass(String storepass)
storepass - The passwordpublic String getStoretype()
public void setStoretype(String storetype)
storetype - The type of keystore
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||