import java.io.IOException;
import org.jdom.JDOMException;
import org.jpos.iso.FSDISOMsg;
import org.jpos.iso.ISOException;
import org.jpos.iso.channel.FSDChannel;
import org.jpos.iso.packager.DummyPackager;
import org.jpos.util.FSDMsg;
import org.jpos.util.Logger;
import org.jpos.util.SimpleLogListener;
public class ThalesAdaptor {
public static void main(String[] args)
{
String command = "EC";
FSDMsg req = new FSDMsg("file:///C:/Temp/thales/cfg/hsm-");
req.set("command", command);
req.set("key-type", "000");
req.set("key-scheme", "U");
req.set("component", "01020304050607080901020304050607");
try {
System.out.println(req.pack());
FSDISOMsg msg = new FSDISOMsg(req);
FSDChannel channel = new FSDChannel();
Logger logger = new Logger();
logger.addListener(new SimpleLogListener(System.out));
channel.setHost("127.0.0.1");
channel.setPort(9998);
channel.setPackager(new DummyPackager());
channel.connect();
channel.send(msg);
}
catch (JDOMException | IOException | ISOException ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}
}
}
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4cad1e57-5188-49ce-a1ba-47454b634fe4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public class Program {
static void start() { Q2 q2 = new Q2(); q2.start();
}
public static void main(String[] args) {
start(); ISOUtil.sleep(2000); Luncher(); } private static void Luncher(){
FSDChannel channel = new FSDChannel(); Logger logger=new Logger(); logger.addListener(new SimpleLogListener(System.out)); channel.setHost("127.0.0.1"); channel.setPort(9998); channel.setPackager(new DummyPackager()); try { channel.connect(); } catch (IOException e) { e.printStackTrace(); } ThalesAdaptor thales=new ThalesAdaptor(); FSDMsg msg=thales.encryptClearComponent(); FSDISOMsg isomsg = new FSDISOMsg(msg); msg.dump(System.out, " "); try {
System.out.println("THE PACKED MSG: "+ msg.pack()); } catch (Exception e) { e.printStackTrace();
It gets set when you configure your channel deploy file with the schema property pointing to the file location.
package jashdajsdg;
import java.io.IOException;
import org.jpos.core.SimpleConfiguration;
import org.jpos.iso.FSDISOMsg;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOUtil;
import org.jpos.iso.channel.FSDChannel;
import org.jpos.iso.packager.DummyPackager;
import org.jpos.util.FSDMsg;
import org.jpos.util.Logger;
import org.jpos.util.SimpleLogListener;
public class ThalesAdaptor {
public static void main(String[] args)
{
String command = "EC";
FSDMsg req = new FSDMsg("file:///C:/Temp/thales/cfg/hsm-");
req.set("command", command);
req.set("key-type", "000");
req.set("key-scheme", "U");
req.set("component", "01020304050607080901020304050607");
req.setCharset(ISOUtil.CHARSET);
try {
// System.out.println(req.pack());
FSDISOMsg msg = new FSDISOMsg(req);
FSDChannel channel = new FSDChannel();
SimpleConfiguration cfg = new SimpleConfiguration();
cfg.put("schema", "file:///C:/Temp/thales/cfg/hsm-");
channel.setConfiguration(cfg);
Logger logger = new Logger();
logger.addListener(new SimpleLogListener(System.out));
channel.setHost("127.0.0.1");
channel.setPort(9998);
channel.setPackager(new DummyPackager());
channel.connect();
channel.send(msg);
}
catch (IOException | ISOException ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/4fa1e1f5-42fc-4ace-be13-2f3a53fb77bb%40googlegroups.com.
5 Years ago I wrote a thales adaptor for thales racal based on jpos FSDMsg
Its @ http://m-sinergi.com/wp/hthales-docs/ Is that applicable in your use case ?
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefDZrs3_C3O9h2ikOGjaD7XeNfnPoQ9a_keYJsVXwQKsWA%40mail.gmail.com.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/565a0ebd-ec7f-4be2-a83f-649010f37226%40googlegroups.com.