+
+// Authentication
+int trSDA(uint8_t *AID, size_t AIDlen, struct tlvdb *tlv) {
+ if (AIDlen < 5)
+ return 1;
+
+ // Get public key index (0x8F)
+ //int PubKeyIndx = 0;
+
+ // Get public key from key storage
+ // GetPublicKey(AID(0..5), PubKeyIndx)
+
+ // Processing of Issuer Public Key Certificate (0x90)
+ //Certificate =
+
+ // check issuer public key certificate
+
+ // Verification of Signed Static Application Data (SSAD) (0x93)
+
+ // get 9F4A Static Data Authentication Tag List
+
+ // set Data Auth Code (9F45) from SSAD
+
+ return 0;
+}
+