CardSelector changes
This commit is contained in:
		| @@ -260,44 +260,46 @@ int getLine(char *line, int max, FILE *fp) | |||||||
| Desc: | Desc: | ||||||
| ****************************************************************************/ | ****************************************************************************/ | ||||||
| int launchSelector(char* pSecretID, | int launchSelector(char* pSecretID, | ||||||
| 			void *secretHandle,  | 							void *secretHandle,  | ||||||
| 		SSCS_BASIC_CREDENTIAL	*basicCred) | 							SSCS_BASIC_CREDENTIAL	*basicCred) | ||||||
|  |  | ||||||
| { | { | ||||||
| 	int32_t		rcode = 0; | 	int32_t		rcode = 0; | ||||||
| 	int32_t		userFound = 0, passFound = 0; | 	int32_t		userFound = 0, passFound = 0; | ||||||
| 	SS_UTF8_T	*pKey = NULL; | 	SS_UTF8_T	*pKey = NULL; | ||||||
| 	uint8_t		*pValue = NULL; | 	uint8_t		*pValue = NULL; | ||||||
| 	uint32_t	unkLen = 0; | 	uint32_t		unkLen = 0; | ||||||
| 	uint32_t	kLen = 0; | 	uint32_t		kLen = 0; | ||||||
| 	uint32_t	vLen = 0;	 | 	uint32_t		vLen = 0;	 | ||||||
|  |  | ||||||
| 	int32_t		argCount = 0; | 	int32_t		argCount = 0; | ||||||
| 	void		*pArgs[MAXARGS] = {0}; | 	void			*pArgs[MAXARGS] = {0}; | ||||||
|  |  | ||||||
| 	void 		*pAppliesTo; | 	void 			*pAppliesTo; | ||||||
|  |  | ||||||
| 	int32_t		claimCount = 0; | 	int32_t		claimCount = 0; | ||||||
| 	void		*pKeys[MAXCLAIMS] = {0}; | 	void			*pKeys[MAXCLAIMS] = {0}; | ||||||
| 	void		*pClaims[MAXCLAIMS] = {0}; | 	void			*pClaims[MAXCLAIMS] = {0}; | ||||||
| 	int32_t		claimStrLen = 0; | 	int32_t		claimStrLen = 0; | ||||||
| 	void		*pClaimsStr = 0; | 	void			*pClaimsStr = 0; | ||||||
|  |  | ||||||
| 	void		*pTempPtr; | 	void			*pTempPtr; | ||||||
| 	int		i = 0; | 	int			i = 0; | ||||||
|  |  | ||||||
| 	FILE *		tokenfile;  | 	FILE *		tokenfile;  | ||||||
| 	 | 	 | ||||||
| 	char		filename[L_tmpnam+1]; | 	char			filename[L_tmpnam+1]; | ||||||
| 	char		*ptr; | 	char			*ptr; | ||||||
| 	void 		*pFileName = 0; | 	void 			*pFileName = 0; | ||||||
|  |  | ||||||
| 	const		char line[256]; | 	const	char 	line[256]; | ||||||
|  |  | ||||||
| 	char 		claimURI[256] = {0}; |  | ||||||
| 	char 		claimvalue[256] = {0}; |  | ||||||
|  |  | ||||||
| 	int		indexToDigitalMeApp = 0; | 	char 			claimURI[256] = {0}; | ||||||
|  | 	char 			passwordURI[256] = {0}; | ||||||
|  | 	char 			claimvalue[256] = {0}; | ||||||
|  |  | ||||||
|  | 	int			indexToDigitalMeApp = 0; | ||||||
|  |  | ||||||
| 	printf("launchSelector method called\r\n"); | 	printf("launchSelector method called\r\n"); | ||||||
|  |  | ||||||
| @@ -354,6 +356,12 @@ int launchSelector(char* pSecretID, | |||||||
| 					sscs_strncpy(pTempPtr, pValue, vLen); | 					sscs_strncpy(pTempPtr, pValue, vLen); | ||||||
| 					pClaims[claimCount++] = pTempPtr; | 					pClaims[claimCount++] = pTempPtr; | ||||||
| 					claimStrLen += sscs_strlen(pValue); | 					claimStrLen += sscs_strlen(pValue); | ||||||
|  |  | ||||||
|  | 					if (!strcmp("Password", pKey)) | ||||||
|  | 					{ | ||||||
|  | 						printf("Mapped password is: %s\r\n", pValue); | ||||||
|  | 						sscs_strncpy(passwordURI, pValue, vLen);	 | ||||||
|  | 					} | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 				// clear the buffers							 | 				// clear the buffers							 | ||||||
| @@ -447,7 +455,7 @@ int launchSelector(char* pSecretID, | |||||||
| 					strcpy(basicCred->username, claimvalue); | 					strcpy(basicCred->username, claimvalue); | ||||||
| 					basicCred->unLen = strlen(claimvalue); | 					basicCred->unLen = strlen(claimvalue); | ||||||
| 				} | 				} | ||||||
| 				else if (!strcmp(claimURI, "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname")) | 				else if (!strcmp(claimURI, passwordURI)) | ||||||
| 				{ | 				{ | ||||||
| 					strcpy(basicCred->password, claimvalue); | 					strcpy(basicCred->password, claimvalue); | ||||||
| 					basicCred->pwordLen = strlen(claimvalue); | 					basicCred->pwordLen = strlen(claimvalue); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user