public final class SignatureSupport extends Object
| Modifier and Type | Field and Description |
|---|---|
private static Set<String> |
C14N_ALGORITHMS
Set of known canonicalization algorithm URIs.
|
| Modifier | Constructor and Description |
|---|---|
private |
SignatureSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
addOrReplaceReferenceCanonicalizationTransform(ContentReference cr,
String uri)
Process the indicated content reference and either add or replace its canonicalization Transform algorithm
with the indicated algorithm.
|
private static org.slf4j.Logger |
getLogger()
Get an SLF4J Logger.
|
private static boolean |
isCanonicalizationAlgorithm(String uri)
Evaluate whether the indicated algorithm URI is a canonicalization algorithm URI.
|
static void |
prepareSignatureParams(Signature signature,
SignatureSigningParameters parameters)
Prepare a
Signature with necessary additional information prior to signing. |
private static void |
processContentReferences(Signature signature,
SignatureSigningParameters parameters)
Prepare the content references.
|
private static void |
processKeyInfo(Signature signature,
SignatureSigningParameters parameters)
Prepare the content references.
|
static void |
signObject(SignableXMLObject signable,
SignatureSigningParameters parameters)
Signs a
SignableXMLObject. |
@Nonnull private static org.slf4j.Logger getLogger()
public static void prepareSignatureParams(@Nonnull Signature signature, @Nonnull SignatureSigningParameters parameters) throws SecurityException
Signature with necessary additional information prior to signing.
NOTE:Since this operation modifies the specified Signature object, it should be called prior to marshalling the Signature object.
The following Signature values will be added:
KeyInfo element representing the signing credentialExisting (non-null) values of these parameters on the specified signature will NOT be overwritten, however.
All values are determined by the specified SignatureSigningParameters. If no value for
a required parameter is specified or included on the passed signature, a SecurityException
will be thrown.
signature - the Signature to be updatedparameters - the signing parameters to useSecurityException - thrown if a required parameter is not supplied in the parameters instance
or available on the Signature instanceprivate static void processKeyInfo(Signature signature, SignatureSigningParameters parameters) throws SecurityException
signature - the Signature to be updatedparameters - the signing parameters to useSecurityException - thrown if a required parameter is not supplied in the parameters instance
or available on the Signature instanceprivate static void processContentReferences(@Nonnull Signature signature, @Nonnull SignatureSigningParameters parameters) throws SecurityException
signature - the Signature to be updatedparameters - the signing parameters to useSecurityException - thrown if a required parameter is not supplied in the parameters instance
or available on the Signature instanceprivate static void addOrReplaceReferenceCanonicalizationTransform(@Nullable ContentReference cr, @Nullable String uri)
cr - the content reference to processuri - the canonicalization algorithm to either add or replaceprivate static boolean isCanonicalizationAlgorithm(@Nullable String uri)
uri - the algorithm URI to evaluatepublic static void signObject(@Nonnull SignableXMLObject signable, @Nonnull SignatureSigningParameters parameters) throws SecurityException, org.opensaml.core.xml.io.MarshallingException, SignatureException
SignableXMLObject.signable - the signable XMLObject to signparameters - the signing parameters to useSecurityException - if there is a problem preparing the signatureorg.opensaml.core.xml.io.MarshallingException - if there is a problem marshalling the XMLObjectSignatureException - if there is a problem with the signature operationCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.