#define BIG_SIZE 5000
#define uid 5001
#define DIGEST_LEN 32
-
+#define DUMMY_AUTH_ICON "data:image/png;base64,iVBORw0KGgoAAA"
GetAuthInfoResp*
BAuthStub::getInfo(void)
{
RET_IF_FAIL(__pluginHandle->process != NULL, NULL);
RET_IF_FAIL(__pluginHandle->process->process != NULL, NULL);
- _INFO("");
TlvEncodable<GetInfoReq> encodableReq;
encodableReq.setEncoder(EID_UAFV1_GETINFO_REQ);
- _INFO("");
TlvEncodable<GetAuthInfoResp> encodableResp;
encodableResp.setEncoder(EID_UAFV1_GETINFO_RESP);
- _INFO("");
Buffer *authReq = encodableReq.encode();
unsigned char *authRespRaw = NULL;
- _INFO("");
__pluginHandle->process->process(authReq->data, &authRespRaw);
- _INFO("");
__cachedData = encodableResp.decode(authRespRaw);
/*Map AuthIndex*/
/*TODO: Find Device ID logic used by IoTCon*/
- _INFO("");
if (__cachedData->authList != NULL) {
_INFO("");
GList *authListIter = g_list_first(__cachedData->authList);
AsmCrypto::getDeviceId(), std::string(authInfo->__aaid),
authInfo->__authenticatorIndex);
- _INFO("After calling getMappedIndex");
+
authInfo->__devId = strdup(AsmCrypto::getDeviceId().c_str());
- _INFO("");
+
authInfo->__isUserEnrolled = isEnrolled();
authInfo->__isRoamingAuthenticator = false;
_INFO("");
}
- _INFO("");
+
/*Fill-up additional data*/
__cachedData->attach_hint = ATTACHMENT_HINT_INTERNAL;
/*__cachedData->attach_hint = __pluginHandle->conn->attach_hint();*/
__cachedData->title = __pluginHandle->conn->title();
__cachedData->description = __pluginHandle->conn->description();
+ __cachedData->icon = strdup(DUMMY_AUTH_ICON);
+
} else if (__cachedData->authList != NULL) { /*Resetting fields altered during last RA operation*/
_INFO("");
GList *authListIter = g_list_first(__cachedData->authList);
Buffer *authReq = NULL;
unsigned char *authRespRaw = NULL;
-
/*Default handlers*/
if (__pluginHandle->assrt == NULL) {
TlvEncodable<RegisterReq> encodableReq(regReq);
(__pluginHandle->assrt->decode(authRespRaw));
RET_IF_FAIL(decodedResp != NULL, NULL);
-
return decodedResp;
}
}
/*#define FIDO_TIZEN_AUTH_KEY_PATH tzplatform_mkpath(TZ_SYS_DATA, "/gear_auth/fido_tizen_auth.key")*/
/*#define FIDO_TIZEN_AUTH_DER_PATH tzplatform_mkpath(TZ_SYS_DATA, "/gear_auth/fido_tizen_auth.der")*/
-const char *AAID = "TEST#1111";
+//const char *AAID = "TEST#1111";
+const char *AAID = "53EC#9001";
+
const char *tcDispConType = "text/plain";
//#define KH_SYMM_KEY "tizen@123";
authInfo->__meta->transactionConfirmationDisplay =
TRANSACTION_CONFIRMATION_DISPLAY_PRIVILEGED_SOFTWARE | TRANSACTION_CONFIRMATION_DISPLAY_ANY;//3;
- authInfo->__meta->authenticationAlg = UAF_ALG_SIGN_RSASSA_PSS_SHA256_RAW;//3
+ authInfo->__meta->authenticationAlg = UAF_ALG_SIGN_SECP256R1_ECDSA_SHA256_RAW; // 1
authInfo->__tcDispConType = strdup(tcDispConType);
fido_auth_plugin_get_title(void)
{
char *title = (char *)calloc(128, sizeof(char));
- snprintf(title, 128 - 1, "%s", "Tizen FIDO Authenticator");
+ snprintf(title, 128 - 1, "%s", "PIN Authenticator");
return title;
}
fido_auth_plugin_get_description(void)
{
char *desc = (char *)calloc(128, sizeof(char));
- snprintf(desc, 128 - 1, "%s", "Tizen FIDO PIN Authenticator");
+ snprintf(desc, 128 - 1, "%s", "Pretty long description");
return desc;
}