Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10678-04


oracle.security.xmlsec.wss.util
Class WSSignatureParams

java.lang.Object
  extended by oracle.security.xmlsec.wss.util.WSSignatureParams


public class WSSignatureParams
extends java.lang.Object

A specification of algorithms and keys for using with XML signature.This includes the following:

Note: This class used to be deprecated before, but not any more. Instead some members are deprecated - cert, certId, keyName, iasn.


Constructor Summary
WSSignatureParams(byte[] hmacKey, java.security.PrivateKey signingKey)
          Create A WSSignaureParam with the c14nMethod=excC14N, digestMethod=SHA1, signMethod=hmacSHA/rsaSHA1/dsaSHA1 (depending on the key)
WSSignatureParams(java.lang.String signMethod, boolean usingDecryptTranform)
          Create a new WSSignatureParams instance.
WSSignatureParams(java.lang.String c14nMethod, java.lang.String signMethod, java.lang.String digestMethod, boolean usingDecryptTranform)
          Create a new WSSignatureParams instance.

 

Method Summary
 java.lang.String getC14nMethod()
          Get the C14N method
 java.lang.String getC14NMethod()
          Get the Canonicalization Algorithm.
 byte[] getCertId()
          Get the Certificate Identifier.
 oracle.security.xmlsec.dsig.XSAlgorithmIdentifier[] getCommonTrans()
          Get a list of transformations that will be added to all the references.
 java.lang.String getDigestMethod()
          Get the Digest Algorithm.
 oracle.security.xmlsec.keys.KeyInfoData getKeyInfoData()
          Get the KeyInfoData (usually a SecurityTokenReference)
 java.lang.String getKeyInfoId()
          Get the id to be put in the ds:KeyInfo element, default - no id is put
 java.lang.String getKeyName()
          Deprecated. Use getKeyInfoData() instead to return a KeyName
 java.security.PrivateKey getPrivateKey()
          Get the Private Key that will be used to generate a PKI signature.
 byte[] getSecretKey()
          Get the Secret Key that will be used to generate a HMAC based signature.
 java.lang.String getSignatureMethod()
          Get the Signature Algorithm.
 java.lang.String getSignMethod()
          Get the sign method
 javax.xml.soap.SOAPMessage getSOAPMessage()
          Get the SOAPMessage that is to be used to resolve attachment References
 java.security.cert.X509Certificate getX509Certificate()
          Get the Public Key Certificate.
 oracle.security.xmlsec.keys.X509Data getX509IssuerAndSerialNumber()
          Get the Certificate Issuer and Serial Number.
 boolean isAttachmentContentOnly()
          Get whether attachments should be signed as content-only
 boolean isUsingDecryptTranform()
          Set the Decrypt
 boolean isUsingSTRTransform()
          Get whether STR transforms are to be used
 void setAttachmentContentOnly(boolean attachmentContentOnly)
          Set whether for attachments should be signed as content-only, default is true.
 void setC14nMethod(java.lang.String method)
          Set the C14N method, default excC14N.
 void setCertId(byte[] certId)
          Set the Certificate Identifier.
 void setCommonTrans(oracle.security.xmlsec.dsig.XSAlgorithmIdentifier[] commonTrans)
          Set a list of transformations that will be added to all the references.
 void setDigestMethod(java.lang.String digestMethod)
          Set the digest method, default SHA1
 void setKeyInfoData(oracle.security.xmlsec.keys.KeyInfoData keyInfoData)
          Set the KeyInfoData (usually a SecurityTokenReference)
 void setKeyInfoId(java.lang.String keyInfoId)
          Set the id to be put in the ds:KeyInfo element, default - no id is put
 void setKeyName(java.lang.String keyName)
          Deprecated. Use setKeyInfoData(KeyInfoData) instead to set a KeyName
 void setPrivateKey(java.security.PrivateKey signingKey)
          Set the Private Key that will be used to generate a PKI signature.
 void setSecretKey(byte[] secretKey)
          Set the Secret Key that will be used to generate a HMAC based signature.
 void setSignMethod(java.lang.String signMethod)
          Set the sign method, default hmacSHA/rsaSHA1/dsaSHA1 (depending on the key)
 void setSOAPMessage(javax.xml.soap.SOAPMessage msg)
          Set the SOAPMessage that is to be used to resolve attachment references
 void setUsingDecryptTranform(boolean usingDecryptTranform)
          Set whether DecryptTransforms are to be used - default false;
 void setUsingSTRTransform(boolean usingSTRTransform)
          Set whether STR transforms are to be used, default - true.
 void setX509Certificate(java.security.cert.X509Certificate cert)
          Set the Public Key Certificate.
 void setX509IssuerAndSerialNumber(oracle.security.xmlsec.keys.X509Data iasn)
          Set the Public Key Certificate Issuer and Serial Number.
 boolean usingDecryptionTransform()
          Indicates if the DecryptTransform is being used.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

WSSignatureParams

public WSSignatureParams(byte[] hmacKey,
                         java.security.PrivateKey signingKey)
Create A WSSignaureParam with the c14nMethod=excC14N, digestMethod=SHA1, signMethod=hmacSHA/rsaSHA1/dsaSHA1 (depending on the key)
Parameters:
hmacKey - The hmacs signing key.
signingKey - The PrivatKey for signing, used if hmacKey is null

WSSignatureParams

public WSSignatureParams(java.lang.String signMethod,
                         boolean usingDecryptTranform)
Create a new WSSignatureParams instance.
Parameters:
signMethod - The signature algorithm.
usingDecryptTranform - Set to true</true> if using the DecryptTransform.

WSSignatureParams

public WSSignatureParams(java.lang.String c14nMethod,
                         java.lang.String signMethod,
                         java.lang.String digestMethod,
                         boolean usingDecryptTranform)
Create a new WSSignatureParams instance.
Parameters:
c14nMethod - The canonicalization algorithm.
digestMethod - The digest algorithm.
signMethod - The signature algorithm.
usingDecryptTranform - Set to true</true> if using the DecryptTransform.

Method Detail

getC14NMethod

public java.lang.String getC14NMethod()
Get the Canonicalization Algorithm.
Returns:
The canonicalization algorithm string.

getSignatureMethod

public java.lang.String getSignatureMethod()
Get the Signature Algorithm.
Returns:
The signature algorithm string.

getDigestMethod

public java.lang.String getDigestMethod()
Get the Digest Algorithm.
Returns:
The digest algorithm string.

usingDecryptionTransform

public boolean usingDecryptionTransform()
Indicates if the DecryptTransform is being used.
Returns:
true if the DecyrptTransform is being used, false otherwise.

setSecretKey

public void setSecretKey(byte[] secretKey)
Set the Secret Key that will be used to generate a HMAC based signature.
Parameters:
secretKey - The key bytes.

setPrivateKey

public void setPrivateKey(java.security.PrivateKey signingKey)
Set the Private Key that will be used to generate a PKI signature.
Parameters:
signingKey - The singing key.

getSecretKey

public byte[] getSecretKey()
Get the Secret Key that will be used to generate a HMAC based signature.
Returns:
The secret key bytes.

getPrivateKey

public java.security.PrivateKey getPrivateKey()
Get the Private Key that will be used to generate a PKI signature.
Returns:
The singing key.

setX509Certificate

public void setX509Certificate(java.security.cert.X509Certificate cert)
Set the Public Key Certificate.
Parameters:
cert - The X.509 certificate.

setCertId

public void setCertId(byte[] certId)
Set the Certificate Identifier.
Parameters:
certId - The certificate identifier bytes.

setKeyName

public void setKeyName(java.lang.String keyName)
Deprecated. Use setKeyInfoData(KeyInfoData) instead to set a KeyName
Set the Key Name.
Parameters:
keyName - The key name.

setX509IssuerAndSerialNumber

public void setX509IssuerAndSerialNumber(oracle.security.xmlsec.keys.X509Data iasn)
Set the Public Key Certificate Issuer and Serial Number.
Parameters:
iasn - The X.509 certificate data.

getX509Certificate

public java.security.cert.X509Certificate getX509Certificate()
Get the Public Key Certificate.
Returns:
The X.509 certificate.

getCertId

public byte[] getCertId()
Get the Certificate Identifier.
Returns:
The certificate identifier bytes.

getKeyName

public java.lang.String getKeyName()
Deprecated. Use getKeyInfoData() instead to return a KeyName
Get the Key Name.
Returns:
The key name.

getX509IssuerAndSerialNumber

public oracle.security.xmlsec.keys.X509Data getX509IssuerAndSerialNumber()
Get the Certificate Issuer and Serial Number.
Returns:
The X.509 certificate data.

isAttachmentContentOnly

public boolean isAttachmentContentOnly()
Get whether attachments should be signed as content-only
Returns:

setAttachmentContentOnly

public void setAttachmentContentOnly(boolean attachmentContentOnly)
Set whether for attachments should be signed as content-only, default is true.
Parameters:
attachmentContentOnly -

getKeyInfoData

public oracle.security.xmlsec.keys.KeyInfoData getKeyInfoData()
Get the KeyInfoData (usually a SecurityTokenReference)
Returns:

setKeyInfoData

public void setKeyInfoData(oracle.security.xmlsec.keys.KeyInfoData keyInfoData)
Set the KeyInfoData (usually a SecurityTokenReference)
Parameters:
keyInfoData -

getKeyInfoId

public java.lang.String getKeyInfoId()
Get the id to be put in the ds:KeyInfo element, default - no id is put
Returns:

setKeyInfoId

public void setKeyInfoId(java.lang.String keyInfoId)
Set the id to be put in the ds:KeyInfo element, default - no id is put
Parameters:
keyInfoId -

getSOAPMessage

public javax.xml.soap.SOAPMessage getSOAPMessage()
Get the SOAPMessage that is to be used to resolve attachment References
Returns:

setSOAPMessage

public void setSOAPMessage(javax.xml.soap.SOAPMessage msg)
Set the SOAPMessage that is to be used to resolve attachment references
Parameters:
msg -

isUsingDecryptTranform

public boolean isUsingDecryptTranform()
Set the Decrypt
Returns:

setUsingDecryptTranform

public void setUsingDecryptTranform(boolean usingDecryptTranform)
Set whether DecryptTransforms are to be used - default false;
Parameters:
usingDecryptTranform -

isUsingSTRTransform

public boolean isUsingSTRTransform()
Get whether STR transforms are to be used
Returns:

setUsingSTRTransform

public void setUsingSTRTransform(boolean usingSTRTransform)
Set whether STR transforms are to be used, default - true. If this is set all URIs that points to a ds:KeyInfo or to a wsse:SecurityTokenReference will get STR transforms.
Parameters:
usingSTRTransform -

getC14nMethod

public java.lang.String getC14nMethod()
Get the C14N method
Returns:

setC14nMethod

public void setC14nMethod(java.lang.String method)
Set the C14N method, default excC14N. This is used for canonicalizing references, SignedInfo, attachments, STR Transforms
Parameters:
method -

getSignMethod

public java.lang.String getSignMethod()
Get the sign method
Returns:

setSignMethod

public void setSignMethod(java.lang.String signMethod)
Set the sign method, default hmacSHA/rsaSHA1/dsaSHA1 (depending on the key)
Parameters:
signMethod -

setDigestMethod

public void setDigestMethod(java.lang.String digestMethod)
Set the digest method, default SHA1
Parameters:
digestMethod -

getCommonTrans

public oracle.security.xmlsec.dsig.XSAlgorithmIdentifier[] getCommonTrans()
Get a list of transformations that will be added to all the references.
Returns:

setCommonTrans

public void setCommonTrans(oracle.security.xmlsec.dsig.XSAlgorithmIdentifier[] commonTrans)
Set a list of transformations that will be added to all the references. this parameter rarely needs to be used, because all the common transformations are already taken care of. .e.g excC14N is automatically added to the references, and STRTransform is also added automatically if the usingSTRTransform is set.
Parameters:
commonTrans -

Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10678-04


Copyright © 2005, 2011 , Oracle. All rights reserved.