Created
September 18, 2020 11:45
-
-
Save typelogic/c75720c698b68b20ca72665b01de6281 to your computer and use it in GitHub Desktop.
loading.java
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 IDPassReader(String alias, String configfile, String keystorePass) | |
throws IDPassException, IOException { | |
byte[] cfg = IDPassHelper.readKeyStoreEntry(alias, configfile, keystorePass); | |
byteArrays bas = byteArrays.parseFrom(cfg); | |
byteArray ba0 = bas.getVals(0); // keyset buf | |
byteArray ba1 = bas.getVals(1); // rootcertificates buf | |
byteArray ba2 = bas.getVals(2); // rootkey buf | |
m_keyset = KeySet.parseFrom(ba0.getVal().toByteArray()); | |
m_rootcertificates = Certificates.parseFrom(ba1.getVal().toByteArray()); | |
m_rootkey = ba2.getVal().toByteArray(); | |
ctx = idpass_init(m_keyset.toByteArray(), m_rootcertificates != null ? m_rootcertificates.toByteArray() : null); | |
if (ctx == 0) { | |
throw new IDPassException("ID PASS Lite could not be initialized"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment