This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String signXmlContent(String inputFile, String keyStoreFilePath, | |
| String keyStorePassword, String keyStoreAlias) throws Exception { | |
| KeyStore keyStore = KeyStore.getInstance("PKCS12"); | |
| keyStore.load(new FileInputStream(keyStoreFilePath), keyStorePassword.toCharArray()); | |
| DocumentBuilderFactory buildFactory = DocumentBuilderFactory.newInstance(); | |
| buildFactory.setNamespaceAware(true); | |
| Document document = buildFactory.newDocumentBuilder().parse(inputFile); | |
| XMLSignatureFactory xmLSignatureFactory = XMLSignatureFactory.getInstance("DOM", | |
| (Provider) Class.forName("org.jcp.xml.dsig.internal.dom.XMLDSigRI").newInstance()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String sha256(File input) throws IOException { | |
| Digest sha256 = new Digest(); | |
| sha256.update(Files.readAllBytes(input.toPath())); | |
| StringBuilder buff = new StringBuilder(); | |
| for (byte b : sha256.digest()) { | |
| buff.append(String.format("%02x", b & 0xFF)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # WildFly Startup Script | |
| # Configuration variables | |
| WILDFLY_HOME="/opt/wildfly-12.0.0.Final" | |
| STANDALONE_DIR="standalone" | |
| BIND_ADDRESS="0.0.0.0" | |
| WILDFLY_BIN="${WILDFLY_HOME}/bin" | |
| STANDALONE_FULL_PATH="${WILDFLY_HOME}/${STANDALONE_DIR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| /// <summary>Holds file attachment metadata for a SOAP request.</summary> | |
| public class AttachmentData |
OlderNewer