_der_cert_s *pcert;
- if (raw_cert == NULL || cert_size <= 0 || ppcert == NULL) {
+ if (raw_cert == NULL || cert_size <= 0 || ppcert == NULL)
return -1;
- }
pcert = static_cast<_der_cert_s*>(malloc(sizeof(_der_cert_s)));
- if (pcert == NULL) {
+ if (pcert == NULL)
return -1;
- }
pcert->raw_cert = reinterpret_cast<unsigned char*>(malloc(cert_size));
if (pcert->raw_cert == NULL) {
{
_INFO("__load_cert_from_x509 start");
- if (xCert == NULL) {
- return -1;
- }
+ if (xCert == NULL)
+ return -1;
BIO *bcert = BIO_new(BIO_s_mem());
{
int ret;
ret = RAND_bytes(random, num);
- if (ret != -1) {
+ if (ret != -1)
return 0;
- } else {
+ else
return -1;
- }
}
bool
const char *privKeyFile, const char *pwd,
unsigned char **signature, int *sig_len)
{
-
OpenSSL_add_all_algorithms();
FILE *fp;
int ret = pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid);
if (ret != PMINFO_R_OK) {
-
_ERR("pkgmgrinfo_pkginfo_get_pkgid failed [%d]", ret);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return 0;
*sig_len = sig_len_loc;
return sig;
-
}
unsigned char*
char *title;
char *description;
char *icon;
-
} GetAuthInfoResp;
/*
* https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-authnr-cmds-v1.0-ps-20141208.html#command-structure-2
*/
typedef struct _AuthenticateReq {
-
int authIdx;
char *appId;
Buffer *fch;
typedef struct _AuthnrMetaData {
-
int authenticatorType;
int maxKeyHandles;
int userVerification;
* https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-asm-api-v1.0-ps-20141208.html#dictionary-authenticatorinfo-members
*/
typedef struct __DisplayTc {
-
int width;
int height;
int bitDepth;
* https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-asm-api-v1.0-ps-20141208.html#dictionary-registerout-members
*/
class AsmRegResponse {
-
public:
~AsmRegResponse(void);
std::string __assertionScheme;
friend class RegisterState;
-
};
#endif //__ASM_REG_RESP_H__
delete static_cast<AsmDeregRequest*>(__args);
}
}
-
}
AsmVersion *
#include "AuthnrTypes.h"
#include "stdio.h"
-AttBasicSurrTlvEncoder::AttBasicSurrTlvEncoder(void)
-{
-
-}
+AttBasicSurrTlvEncoder::AttBasicSurrTlvEncoder(void) {}
Buffer *
AttBasicSurrTlvEncoder::encode(const void *authData)
bool foundMember = false;
while(1) {
-
switch(child->tag) {
-
case TAG_SIGNATURE:
getAttBasicSurrInfo->sig = (Buffer*)__buffTlvEncoder.decode(rawData + rawIter);
foundMember = true;
return __encoderTable->find(id)->second;
}
-TlvEncoderFactory::TlvEncoderFactory(void)
-{
-
-}
+TlvEncoderFactory::TlvEncoderFactory(void) {}
std::map<int, ITlvEncoder*>*
TlvEncoderFactory::loadAllEncoders(void)
}
g_main_loop_quit(AcUiAdaptor::getInstance()->__mainLoop);
-
}
AcUiAdaptor::AcUiAdaptor(void)
{
_BEGIN;
switch (type) {
-
case AUTH_UI_TYPE_PIN:
_INFO("AuthUiFactory::getAuthUiAdaptor:: PinAuthUiAdaptor");
return PinAuthUiAdaptor::getInstance();
std::vector<IAuthStub*>::iterator stIter = stubList->begin();
for (; stIter != stubList->end(); ++stIter) {
-
IAuthStub *stub = (IAuthStub*)(*stIter);
if (stub != NULL) {
origList->push_back(stub);
std::vector<IADProvider*>::iterator adIter = __providerList.begin();
for (; adIter != __providerList.end(); ++adIter) {
-
IADProvider *pro = (IADProvider*)(*adIter);
if ((type == AUTH_TYPE_ALL) || (pro->getType() == type)) {
#include <vector>
class RegisterOp:public AsmOp {
-
public:
~RegisterOp(void);
virtual char* execute(void);
/*tcHash when authMode = 0x02 i.e transaction content is not empty*/
if (getAuthReqInfo->tc != NULL) {
-
unsigned char tcHash[32];
getAuthRespInfo->authAssertion->sigData->assrtInfo->authMode = 0x02;
int ret = AsmCrypto::genHash256(getAuthReqInfo->tc, strlen(getAuthReqInfo->tc), tcHash);
}
}
}
-
}
_ERR("Out of while!!");
return 0;