Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in log changes #270

Merged
merged 5 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public boolean decode() {
List<BerTlv> values = outer.getList();
for(BerTlv tlv : values) {
if(tlv.isPrimitive()) {
s_logger.debug("Tag {}: {}", Hex.encodeHexString(tlv.getTag().bytes), Hex.encodeHexString(tlv.getBytesValue()));
s_logger.trace("Tag {}: {}", Hex.encodeHexString(tlv.getTag().bytes), Hex.encodeHexString(tlv.getBytesValue()));

BerTlvs outer2 = tlvp.parse(tlv.getBytesValue());

Expand Down
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