Skip to content

Commit

Permalink
Merge pull request #270 from GSA/swing
Browse files Browse the repository at this point in the history
Pull in log changes
  • Loading branch information
bob-fontana authored Jun 23, 2020
2 parents 8650ddf + 0f21f1b commit 2cb52ba
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public void dump(Class<?> classz) {

Logger s_containerLogger = LoggerFactory.getLogger(className);
s_containerLogger.debug("Container: {}", APDUConstants.oidNameMap.get(m_OID).replace(" ", "_"));
s_containerLogger.debug("Raw bytes: {}", Hex.encodeHexString(m_dataBytes));
for (int i = 0; i < m_tagList.size(); i++) {
BerTag tag = m_tagList.get(i);
if (tag == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,12 @@ public boolean verifyHashes() {
LDSSecurityObject ldsso = null;
try {
signedData = new CMSSignedData(m_so);
ldsso = LDSSecurityObject.getInstance(signedData.getSignedContent().getContent());
ASN1Sequence seq = ASN1Sequence.getInstance(signedData.getSignedContent().getContent());
ldsso = LDSSecurityObject.getInstance(seq);
} catch (CMSException ex) {
s_logger.error("Unable to create CMSSignedData object from Security Object data.");
s_logger.error("CMSException: " + ex.getMessage());
} catch (Exception ex) {
s_logger.error(ex.getMessage());
}

if (ldsso != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ public void setGlobalPin(String globalPin) {
m_globalPin = globalPin;
}

public String getAtr() {
return m_atr;
}

public void setAtr(String atr) {
m_atr = atr;
}

public CardTerminal getTerminal() {
return m_terminal;
}
Expand Down Expand Up @@ -73,6 +81,7 @@ public enum LOGIN_STATUS {

private String m_applicationPin = null;
private String m_globalPin = null;
private String m_atr = null;

private CardTerminal m_terminal = null;
private CardHandle m_cardHandle = null;
Expand All @@ -94,11 +103,10 @@ public void reset() {
m_readerIndex = -1;
m_applicationPin = null;
m_globalPin = null;
m_atr = null;
m_terminal = null;
m_pivHandle = null;
m_cardHandle = null;
m_lastLoginStatus = LOGIN_STATUS.LOGIN_NOT_TRIED;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
public class GuiRunnerApplication {

private static final org.slf4j.Logger s_logger = LoggerFactory.getLogger(GuiRunnerApplication.class);
private static final String cctVersion = "v0.1.8-Beta";
private static final String cctVersion = "v0.1.10-Beta";

private JFrame m_mainFrame;
private DebugWindow m_debugFrame;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ public void refreshReaderStatus(CardSettingsSingleton css) {
byte[] atr = CardInfoController.getATR();
if(atr != null) {
String hexAtr = Hex.encodeHexString(atr);
status = "Card present: " + hexAtr;
status = "ATR: " + hexAtr;
s_logger.debug(status);
css.setAtr(hexAtr);
} else {
status = "Unable to connect to card";
}
Expand Down

0 comments on commit 2cb52ba

Please sign in to comment.