integration-impl/src/main/java/se/idsec/signservice/integration/SignServiceIntegrationServiceInitializer.java
public synchronized static void initialize(final SecurityConfiguration securityConfiguration) throws Exception {

    if (initialized) {
      log.debug("SignService Integration Service has already been initialized");
      return;
    }

    // First of all, before initializing Apache xmlsec, we make sure that no chunked Base64 string
    // are produced. They end with CRLF, and XML serializing will escape CR with in some cases leads
    // to signature validation errors (.Net software etc).
    //
    log.info("Setting system property 'org.apache.xml.security.ignoreLineBreaks' to true");
    AccessController.doPrivileged(
      (PrivilegedAction<String>) () -> System.setProperty("org.apache.xml.security.ignoreLineBreaks", "true"));

    // Initialize OpenSAML (Apache xmlsec will be initialized by OpenSAML).
    //
    final SecurityConfiguration openSamlConf = securityConfiguration != null ? securityConfiguration : new DefaultSecurityConfiguration();
    log.info("Initializing OpenSAML with security configuration '{}'", openSamlConf.getClass().getName());
    OpenSAMLInitializer.getInstance()
      .initialize(
        new OpenSAMLSecurityDefaultsConfig(openSamlConf),
        new OpenSAMLSecurityExtensionConfig());

    initialized = true;
    log.debug("SignService Integration Service was successfully initialized");
  }
/**
   * Initializes Apache and OpenSAML with the algorithm settings provided by the supplied OpenSAML security settings.
   * Possible security settings comprises of:
   * <ul>
   * <li>{@link DefaultSecurityConfiguration} - OpenSAML's default configuration.</li>
   * <li>{@link SAML2IntSecurityConfiguration} - Security defaults according to Kantara's
   * <a href="https://kantarainitiative.github.io/SAMLprofiles/saml2int.html">SAML2Int specification</a>.</li>
   * <li>{@link SwedishEidSecurityConfiguration} - Security defaults according to the Swedish eID Framework, see
   * <a href="docs.swedenconnect.se">https://docs.swedenconnect.se</a>.</li>
   * </ul>
   * 
   * @param securityConfiguration
   *          the OpenSAML security configuration to apply
   * @throws Exception
   *           for initialization errors
   */
Initializes Apache and OpenSAML with the algorithm settings provided by the supplied OpenSAML security settings.

@param securityConfiguration
the OpenSAML security configuration to apply
@throws Exception
for initialization errors
Initializes Apache and OpenSAML with the algorithm settings provided by the supplied OpenSAML security settings . @param securityConfiguration the OpenSAML security configuration to apply @throws Exception for initialization errors
public synchronized static void initialize(final SecurityConfiguration securityConfiguration) throws Exception {
    if (initialized) {
      log.debug("SignService Integration Service has already been initialized");
      return;
    }
    log.info("Setting system property 'org.apache.xml.security.ignoreLineBreaks' to true");
    AccessController.doPrivileged(
      (PrivilegedAction<String>) () -> System.setProperty("org.apache.xml.security.ignoreLineBreaks", "true"));
     Initialize OpenSAML (Apache xmlsec will be initialized by OpenSAML).
    final SecurityConfiguration openSamlConf = securityConfiguration != null ? securityConfiguration : new DefaultSecurityConfiguration();
    log.info("Initializing OpenSAML with security configuration '{}'", openSamlConf.getClass().getName());
    OpenSAMLInitializer.getInstance()
      .initialize(
        new OpenSAMLSecurityDefaultsConfig(openSamlConf),
        new OpenSAMLSecurityExtensionConfig());
    initialized = true;
    log.debug("SignService Integration Service was successfully initialized");
  }
public synchronized static void initialize ( final SecurityConfiguration securityConfiguration ) throws Exception { if ( initialized ) { log . debug ( "SignService Integration Service has already been initialized" ) ; return ; } log . info ( "Setting system property 'org.apache.xml.security.ignoreLineBreaks' to true" ) ; AccessController . doPrivileged ( ( PrivilegedAction < String > ) ( ) -> System . setProperty ( "org.apache.xml.security.ignoreLineBreaks" , "true" ) ) ; final SecurityConfiguration openSamlConf = securityConfiguration != null ? securityConfiguration : new DefaultSecurityConfiguration ( ) ; log . info ( "Initializing OpenSAML with security configuration '{}'" , openSamlConf . getClass ( ) . getName ( ) ) ; OpenSAMLInitializer . getInstance ( ) . initialize ( new OpenSAMLSecurityDefaultsConfig ( openSamlConf ) , new OpenSAMLSecurityExtensionConfig ( ) ) ; initialized = true ; log . debug ( "SignService Integration Service was successfully initialized" ) ; }
Initializes Apache and OpenSAML with the algorithm settings provided by the supplied OpenSAML security settings.
Initializes Apache and OpenSAML with the algorithm settings provided by the supplied OpenSAML security settings .
// First of all, before initializing Apache xmlsec, we make sure that no chunked Base64 string // are produced. They end with CRLF, and XML serializing will escape CR with in some cases leads // to signature validation errors (.Net software etc). // // Initialize OpenSAML (Apache xmlsec will be initialized by OpenSAML). //