Skip to content

Commit

Permalink
Rename package, there is now "esteid.org".
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Jan 27, 2016
1 parent a24ac87 commit 253b4b7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package esteidhacker;
package org.esteid;

import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
Expand Down
22 changes: 11 additions & 11 deletions src/esteidhacker/CLI.java → src/org/esteid/hacker/CLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package esteidhacker;
package org.esteid.hacker;

import java.io.File;
import java.io.FileReader;
Expand All @@ -29,6 +29,7 @@
import java.util.Map;

import javax.smartcardio.Card;
import javax.smartcardio.CardException;
import javax.smartcardio.CardTerminal;
import javax.smartcardio.CardTerminals;
import javax.smartcardio.CommandAPDU;
Expand All @@ -44,14 +45,17 @@
import apdu4j.HexUtils;
import apdu4j.LoggingCardTerminal;
import apdu4j.TerminalManager;
import esteidhacker.EstEID.CardType;
import esteidhacker.EstEID.PIN;
import esteidhacker.EstEID.PersonalData;
import javacard.framework.AID;
import joptsimple.OptionException;
import joptsimple.OptionParser;
import joptsimple.OptionSet;

import org.esteid.EstEID;
import org.esteid.EstEID.CardType;
import org.esteid.EstEID.PIN;
import org.esteid.EstEID.PersonalData;
import org.esteid.applet.FakeEstEID;

import pro.javacard.gp.GlobalPlatform;
import pro.javacard.vre.VJCREProvider;
import pro.javacard.vre.VRE;
Expand Down Expand Up @@ -323,12 +327,8 @@ else if (args.has(OPT_T1))
card = term.connect(protocol);
EstEID esteid = EstEID.getInstance(card.getBasicChannel());

if (args.has(OPT_RELAX)) {
esteid.strict = false;
}

if (args.has(OPT_VERBOSE) || args.has(OPT_INFO)) {
System.out.println("ATR: " + HexUtils.encodeHexString(card.getATR().getBytes()));
System.out.println("ATR: " + HexUtils.bin2hex(card.getATR().getBytes()));
System.out.println("Type: " + esteid.getType());
}

Expand Down Expand Up @@ -410,11 +410,11 @@ else if (args.has(OPT_T1))
if (args.has(OPT_TEST_CRYPTO) || args.has(OPT_TEST)) {
esteid.crypto_tests(pin1, pin2);
}
} catch (Exception e) {
} catch (CardException e) {
if (TerminalManager.getExceptionMessage(e) != null) {
System.out.println("PC/SC Error: " + TerminalManager.getExceptionMessage(e));
} else {
throw e;
System.out.println("Error: " + e.getMessage());
}
} finally {
if (card != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package esteidhacker;
package org.esteid.hacker;

import java.io.File;
import java.io.FileInputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package esteidhacker;
package org.esteid.hacker;

import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -46,6 +46,7 @@
import org.bouncycastle.openssl.PEMKeyPair;
import org.bouncycastle.openssl.PEMParser;
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
import org.esteid.EstEID;

// Given a connection to a FakeEstEID applet, provides a higher level interface for the possibilities.
public class FakeEstEIDManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package esteidhacker;
package org.esteid.hacker;

import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
Expand Down

0 comments on commit 253b4b7

Please sign in to comment.