|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sap.security.core.server.ssf.SsfDataSMIME
Class for representing data to be digitally signed, verified, encrypted or decrypted, using S/MIME as security format.
| Fields inherited from interface com.sap.security.api.ssf.ISsfData |
ALG_AES128_CBC, ALG_DES_EDE3_CBC, ALG_MD5, ALG_RC2_40_CBC, ALG_RC2_CBC, ALG_SHA, INC_CERT_CHAIN, INC_CERT_CHAIN_ROOT, INC_CERT_NONE, INC_CERT_OWN |
| Constructor Summary | |
SsfDataSMIME(java.io.InputStream is,
javax.mail.Session sess)
Constructs SsfDataSMIME object from an InputStream |
|
SsfDataSMIME(javax.mail.internet.MimeMessage mess,
javax.mail.Session sess)
Constructs SsfDataSMIME object from a MimeMessage |
|
| Method Summary | |
boolean |
decrypt(ISsfProfile profile)
Decrypts the given data. |
boolean |
encrypt(SsfSigRcpList rcpList,
ISsfPab pab)
Encrypts the given data. |
boolean |
encrypt(SsfSigRcpList rcpList,
ISsfPab pab,
java.lang.String symAlg)
Encrypts the given data. |
javax.mail.internet.MimeMessage |
getDataSMIME()
Get message which results from previous operations |
void |
setNewContentTypes(boolean newContentTypes)
Sets the parameter newContentTypes. |
boolean |
sign(ISsfProfile profile)
Creates a digital siganture of the given data. |
boolean |
sign(ISsfProfile profile,
java.lang.String mdAlg,
int incCerts,
boolean detached)
Creates a digital siganture of the given data. |
java.lang.String |
toString()
Get information about the S/MIME data |
boolean |
verify(ISsfPab pab,
SsfSigRcpList sigList)
Verifies a digital signature of the given data. |
boolean |
verify(ISsfPab pab,
SsfSigRcpList sigList,
ISsfData input,
java.security.cert.X509Certificate cert)
Verifies a digital signature of the given data. |
boolean |
verify(ISsfPab pab,
SsfSigRcpList sigList,
java.security.cert.X509Certificate cert)
Verifies a digital signature of the given data. |
boolean |
writeTo(java.io.OutputStream out)
Writes the changed data to an output stream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SsfDataSMIME(java.io.InputStream is,
javax.mail.Session sess)
throws SsfInvalidDataException
is - InputStream containing the datasess - Session of MimeMessage (may be null)SsfInvalidDataException - if no MIME data is supplied
public SsfDataSMIME(javax.mail.internet.MimeMessage mess,
javax.mail.Session sess)
throws SsfInvalidDataException
mess - MimeMessage objectsess - Session of MimeMessage (may be null)SsfInvalidDataException - if no MIME data is supplied| Method Detail |
public boolean sign(ISsfProfile profile)
throws SsfInvalidKeyException
ISsfDatasign in interface ISsfDataISsfData.sign(com.sap.security.api.ssf.ISsfProfile)
public boolean sign(ISsfProfile profile,
java.lang.String mdAlg,
int incCerts,
boolean detached)
throws SsfInvalidKeyException,
SsfInvalidAlgException
ISsfDatasign in interface ISsfDataISsfData.sign(com.sap.security.api.ssf.ISsfProfile)
public boolean verify(ISsfPab pab,
SsfSigRcpList sigList)
throws SsfInvalidDataException
ISsfDataverify in interface ISsfDataISsfData.verify(com.sap.security.api.ssf.ISsfPab, com.sap.security.core.server.ssf.SsfSigRcpList)
public boolean verify(ISsfPab pab,
SsfSigRcpList sigList,
ISsfData input,
java.security.cert.X509Certificate cert)
throws SsfInvalidDataException
verify in interface ISsfDatapab - personal address book containing trusted certificates (if
null, all certificates are considered as trusted, i.e.
the signer certificates must be validated by the caller)sigList - list of signer informationinput - ignored parameter, pass null)cert - certificate to be used for verification (if null, use
certificate included in signed data)verify(pab, signer, (X509Certificate[]) null)SsfInvalidDataException - if given data is not digitally signed
public boolean verify(ISsfPab pab,
SsfSigRcpList sigList,
java.security.cert.X509Certificate cert)
throws SsfInvalidDataException
pab - personal address book containing trusted certificates (if
null, all certificates are considered as trusted, i.e.
the signer certificates must be validated by the caller)sigList - list of signer informationcert - certificate to be used for verification (if null, use
certificate included in signed data)true if (at least one) signature could be verifiedSsfInvalidDataException - if given data is not digitally signed
public boolean encrypt(SsfSigRcpList rcpList,
ISsfPab pab)
throws SsfInvalidKeyException
ISsfDataencrypt in interface ISsfDataISsfData.encrypt(com.sap.security.core.server.ssf.SsfSigRcpList, com.sap.security.api.ssf.ISsfPab)
public boolean encrypt(SsfSigRcpList rcpList,
ISsfPab pab,
java.lang.String symAlg)
throws SsfInvalidKeyException,
SsfInvalidAlgException
ISsfDataencrypt in interface ISsfDataISsfData.encrypt(com.sap.security.core.server.ssf.SsfSigRcpList, com.sap.security.api.ssf.ISsfPab)
public boolean decrypt(ISsfProfile profile)
throws SsfInvalidKeyException,
SsfInvalidDataException
ISsfDatadecrypt in interface ISsfDataISsfData.decrypt(com.sap.security.api.ssf.ISsfProfile)public void setNewContentTypes(boolean newContentTypes)
newContentTypes. If this parameter is
true, use the new content types (application/pkcs7-signature
and application/pkcs7-mime). As default the old content types
(application/x-pkcs7-signature and application/x-pkcs7-mime) are used.newContentTypes - boolean that indicates if the new or old content
types are used
public boolean writeTo(java.io.OutputStream out)
throws java.io.IOException
ISsfDatawriteTo in interface ISsfDataISsfData.writeTo(java.io.OutputStream)public javax.mail.internet.MimeMessage getDataSMIME()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||