/** * */ package aspects; import javacard.framework.APDU; import javacard.framework.Applet; import javacard.framework.ISOException; import javacardx.crypto.Cipher; import anoncard.util.Helpers; import anoncard.Sha2; import anoncard.JC_OAEP; import anoncard.util.ISOExceptionException; /** * Don't touch this aspect. Some Test will possibly fail. * * @author christoph * */ public aspect JavaCardFramworkAspect { void around(short errorCode) : call(static * ISOException.throwIt(short)) && args(errorCode) { throw new ISOExceptionException(Helpers.shortToHexString(errorCode)); } void around() : target(Applet) && call(* register(..) throws *) { // do nothing } boolean around() : target(Applet) && call(* selectingApplet()) { return false; } Cipher around() : call(static * Cipher.getInstance(..)) { return null; } void around(): execution(Sha2.new(..)) { } void around(): execution(JC_OAEP.new(..)) { } // is currently not applied, cause lines are commented out in ANONCardApplet.constructor void around(): target(JC_OAEP) && call(* init(..)) { } }