public void AfterReadApplicationData(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } // dump all records foreach (var record in emv.TlvRecords) { foreach (TlvData tlv in record.GetTags()) { WriteTlv(tlv.Tag, tlv, TlvDictionary); } } // informations about SDA if (emv.Sda != null) { gui.guiDetailedLogs.AppendText(String.Format("SDA: {0}\n", emv.Sda)); } else { gui.guiDetailedLogs.AppendText("SDA not supported or unknown Certification Authority\n"); } }
private void AfterPseRead(Object sender, EmvEventArgs eventArgs) { var pse = sender as PaymentSystemEnvironment; if (pse == null) { throw new ArgumentException("sender is not a PaymentSystemEnvironment"); } Console.WriteLine(); Console.WriteLine("= = = = = = P S E R e a d"); Console.WriteLine(); foreach (var record in pse.TlvRecords) { foreach (TlvData tlv in record.GetTags()) { xmlRoot.Elements().Last().Add(tlv.ToXmlNode(xmlDoc)); WriteTlv(tlv.Tag, tlv, tagsManager); } } Console.WriteLine(); Console.WriteLine("=========== P S E A p p l i c a t i o n s f o u n d"); Console.WriteLine(); foreach (var emvFound in pse.GetApplications()) { Console.WriteLine(" >> Application '{0}' [ {1} ] found", emvFound.Aid, tagsManager.CreateInstance(emvFound.TlvFromPSE.GetTag(0x50))); } }
public void AfterGetData(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } if (emv.TlvATC != null) { WriteTlv(emv.TlvATC.Tag, emv.TlvATC, TlvDictionary); } if (emv.TlvLastOnlineATCRegister != null) { WriteTlv(emv.TlvLastOnlineATCRegister.Tag, emv.TlvLastOnlineATCRegister, TlvDictionary); } if (emv.TlvPINTryCounter != null) { WriteTlv(emv.TlvPINTryCounter.Tag, emv.TlvPINTryCounter, TlvDictionary); } if (emv.TlvLogFormat != null) { WriteTlv(emv.TlvLogFormat.Tag, emv.TlvLogFormat, TlvDictionary); } }
private void AfterGetProcessingOptions(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } Console.WriteLine(); Console.WriteLine("= = = = = = E M V G e t P r o c e s s i n g O p t i o n s {0}", emv.Aid); Console.WriteLine(); foreach (TlvData tlv in emv.TlvProcessingOptions.GetTags()) { xmlRoot.Elements().Last().Add(tlv.ToXmlNode(xmlDoc)); WriteTlv(tlv.Tag, tlv, tagsManager); } Console.WriteLine(" >> {0}", emv.Aip); foreach (var file in emv.Afl.Files) { Console.WriteLine(" >> {0}", file); } }
public void AfterPseRead(Object sender, EmvEventArgs eventArgs) { var pse = sender as PaymentSystemEnvironment; if (pse == null) { throw new ArgumentException("sender is not a PaymentSystemEnvironment"); } foreach (var record in pse.TlvRecords) { foreach (TlvData tlv in record.GetTags()) { WriteTlv(tlv.Tag, tlv, TlvDictionary); } } gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText("PSE Applications found:\n"); foreach (var emvFound in pse.GetApplications()) { gui.guiDetailedLogs.AppendText(String.Format(" >> Application '{0}' [ {1} ] found\n", emvFound.Aid, TlvDictionary.CreateInstance(emvFound.TlvFromPSE.GetTag(0x50)))); } }
private void AfterGetData(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } Console.WriteLine(); Console.WriteLine("= = = = = = E M V G e t D a t a {0}", emv.Aid); Console.WriteLine(); if (emv.TlvATC != null) { xmlRoot.Elements().Last().Add(emv.TlvATC.ToXmlNode(xmlDoc)); WriteTlv(emv.TlvATC.Tag, emv.TlvATC, tagsManager); } if (emv.TlvLastOnlineATCRegister != null) { xmlRoot.Elements().Last().Add(emv.TlvLastOnlineATCRegister.ToXmlNode(xmlDoc)); WriteTlv(emv.TlvLastOnlineATCRegister.Tag, emv.TlvLastOnlineATCRegister, tagsManager); } if (emv.TlvPINTryCounter != null) { xmlRoot.Elements().Last().Add(emv.TlvPINTryCounter.ToXmlNode(xmlDoc)); WriteTlv(emv.TlvPINTryCounter.Tag, emv.TlvPINTryCounter, tagsManager); } if (emv.TlvLogFormat != null) { xmlRoot.Elements().Last().Add(emv.TlvLogFormat.ToXmlNode(xmlDoc)); WriteTlv(emv.TlvLogFormat.Tag, emv.TlvLogFormat, tagsManager); } }
private void BeforePseRead(Object sender, EmvEventArgs eventArgs) { Console.WriteLine(); Console.WriteLine("=========== P S E R e a d"); Console.WriteLine(); xmlRoot.Add(new XElement("PSERead")); }
private void afterVerifyPinEventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterVerifyPinEventHandler(sender, eventArgs))); return; } updateAfterAIDSelect_Content(sender as EmvApplication); }
private void afterPSESelectEventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterPSESelectEventHandler(sender, eventArgs))); return; } var df = sender as EmvDefinitionFile; updateAfterPSESelect_Content(df); }
private void afterPSEReadEventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterPSEReadEventHandler(sender, eventArgs))); return; } var pse = sender as PaymentSystemEnvironment; updateAfterPSEReadRecords_Content(pse); }
private void afterGenerateAC1EventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterGenerateAC1EventHandler(sender, eventArgs))); return; } var emv = sender as EmvApplication; updateAfterAIDSelect_Content(emv); UpdateTvr(emv); }
private void afterReadLogFileEventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterReadLogFileEventHandler(sender, eventArgs))); return; } var emv = sender as EmvApplication; UpdateLogRecords(emv); UpdateTvr(emv); }
public void BeforeGetChallenge(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText(String.Format("E M V G e t C h a l l e n g e {0}\n", emv.Aid)); gui.guiDetailedLogs.AppendText("\n"); }
public void BeforeApplicationSelection(Object sender, EmvEventArgs eventArgs) { var df = sender as EmvDefinitionFile; if (df == null) { throw new ArgumentException("sender is not an EmvDefinitionFile"); } gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText(String.Format("E M V A I D S e l e c t i o n {0}\n", df.Aid)); gui.guiDetailedLogs.AppendText("\n"); }
public void AfterGetChallenge(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } if (emv.IccChallenge != null) { gui.guiDetailedLogs.AppendText(String.Format(" >> {0}\n", emv.IccChallenge.ToHexa())); } }
private void BeforeApplicationSelection(Object sender, EmvEventArgs eventArgs) { var df = sender as EmvDefinitionFile; if (df == null) { throw new ArgumentException("sender is not an EmvDefinitionFile"); } Console.WriteLine(); Console.WriteLine("=========== E M V A I D S e l e c t i o n {0}", df.Aid); Console.WriteLine(); xmlRoot.Add(new XElement("ApplicationSelection")); }
private void BeforeGetData(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } Console.WriteLine(); Console.WriteLine("=========== E M V G e t D a t a {0}", emv.Aid); Console.WriteLine(); xmlRoot.Add(new XElement("GetData")); }
public void BeforeGenerateAc1(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText(String.Format("E M V G e n e r a t e A C 1 {0}\n", emv.Aid)); gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText(String.Format(" >> Requested AC: {0}\n", emv.RequestedAC1Type)); gui.guiDetailedLogs.AppendText(String.Format(" >> Unpredictable Number: {0}\n", emv.TlvGenerateAC1UnpredictableNumber)); }
private void afterReadApplicationDataEventHandler(Object sender, EmvEventArgs eventArgs) { if (InvokeRequired) { Invoke(new MethodInvoker(() => afterReadApplicationDataEventHandler(sender, eventArgs))); return; } var emv = sender as EmvApplication; updateAfterAIDSelect_Content(emv); UpdatePublicKeysTab(emv); UpdateAuthenticationTabSdaDone(emv); UpdateAuthenticationTabSignedData(emv); UpdateTvr(emv); }
public void AfterGenerateAc1(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } if (emv.TlvGenerateAC1Response == null) { return; } WriteTlv(emv.TlvGenerateAC1Response.Tag, emv.TlvGenerateAC1Response, TlvDictionary); gui.guiDetailedLogs.AppendText(String.Format(" >> Cryptogram Information Data: {0}\n", emv.Cid1)); gui.guiDetailedLogs.AppendText(String.Format(" >> Application Cryptogram Counter: {0}\n", emv.AtcFromAC1)); }
private void AfterReadApplicationData(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } Console.WriteLine(); Console.WriteLine("= = = = = = E M V R e a d A p p l i c a t i o n D a t a {0}", emv.Aid); Console.WriteLine(); foreach (var record in emv.TlvRecords) { foreach (TlvData tlv in record.GetTags()) { xmlRoot.Elements().Last().Add(tlv.ToXmlNode(xmlDoc)); WriteTlv(tlv.Tag, tlv, tagsManager); } } }
public void AfterApplicationSelection(Object sender, EmvEventArgs eventArgs) { var df = sender as EmvDefinitionFile; if (df == null) { throw new ArgumentException("sender is not an EmvDefinitionFile"); } if (df.TlvFci != null) { gui.guiDetailedLogs.AppendText(String.Format(" >> TLV: {0}\n", df.TlvFci)); foreach (TlvData tlv in df.TlvFci.GetTags()) { WriteTlv(tlv.Tag, tlv, TlvDictionary); } } else { gui.guiDetailedLogs.AppendText(" >> AID not found\n"); } }
private void AfterApplicationSelection(Object sender, EmvEventArgs eventArgs) { var df = sender as EmvDefinitionFile; if (df == null) { throw new ArgumentException("sender is not an EmvDefinitionFile"); } Console.WriteLine(); Console.WriteLine("= = = = = = E M V A I D S e l e c t i o n {0}", df.Aid); Console.WriteLine(); if (df.TlvFci != null) { Console.WriteLine(" >> TLV: " + df.TlvFci); foreach (TlvData tlv in df.TlvFci.GetTags()) { xmlRoot.Elements().Last().Add(tlv.ToXmlNode(xmlDoc)); WriteTlv(tlv.Tag, tlv, tagsManager); } } }
public void AfterGetProcessingOptions(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } if (emv.TlvProcessingOptions == null) { return; } foreach (TlvData tlv in emv.TlvProcessingOptions.GetTags()) { WriteTlv(tlv.Tag, tlv, TlvDictionary); } gui.guiDetailedLogs.AppendText(String.Format(" >> {0}\n", emv.Aip)); foreach (var file in emv.Afl.Files) { gui.guiDetailedLogs.AppendText(String.Format(" >> {0}\n", file)); } }
public void AfterInternalAuthenticate(Object sender, EmvEventArgs eventArgs) { var emv = sender as EmvApplication; if (emv == null) { throw new ArgumentException("sender is not an EMVApplication"); } if (emv.TlvSignedDynamicApplicationResponse != null) { WriteTlv(emv.TlvSignedDynamicApplicationResponse.Tag, emv.TlvSignedDynamicApplicationResponse, TlvDictionary); } // informations about DDA if (emv.Dda != null) { gui.guiDetailedLogs.AppendText(String.Format("DDA: {0}", emv.Dda)); } else { gui.guiDetailedLogs.AppendText("DDA not supported or unknown Certification Authority"); } }
public void AfterReadLogFile(Object sender, EmvEventArgs eventArgs) { }
public void BeforePseRead(Object sender, EmvEventArgs eventArgs) { gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText("P S E R e a d\n"); gui.guiDetailedLogs.AppendText("\n"); }
public void BeforePseSelection(Object sender, EmvEventArgs eventArgs) { gui.guiDetailedLogs.AppendText("\n"); gui.guiDetailedLogs.AppendText("P S E S e l e c t i o n\n"); gui.guiDetailedLogs.AppendText("\n"); }
public void AfterVerifyPin(Object sender, EmvEventArgs eventArgs) { }