Hi Martin,

Thanks for applying the patch and the tidying! Just noticed a slight
error, attached another patch to fix.

Many thanks,

Duncan

On Mon, Apr 4, 2011 at 7:42 AM, Martin Willi <[email protected]> wrote:
> Hi Duncan,
>
>> I've attached a patch adding support for EAP-SIM with pcsc-lite. This
>> allows EAP-SIM authentication using a SIM card in most smartcard
>> readers. Could this be added to the repository?
>
> I don't have the hardware to test the patch, but it looks very nice.
>
> I've pushed your patch to our master [1]. While reviewing the code, I
> slightly reformatted some longer lines [2] and introduced INIT/METHOD
> macros [3] to gain type safety at least for the actually implemented
> functions.
>
> Thanks a lot for your contribution!
>
> Best regards
> Martin
>
> [1]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=80dca77a
> [2]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=13d72e90
> [3]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=ce9352b3
>
>
>
diff --git a/src/libcharon/plugins/eap_sim_pcsc/eap_sim_pcsc_card.c b/src/libcharon/plugins/eap_sim_pcsc/eap_sim_pcsc_card.c
index 4d68ef6..e7f393d 100644
--- a/src/libcharon/plugins/eap_sim_pcsc/eap_sim_pcsc_card.c
+++ b/src/libcharon/plugins/eap_sim_pcsc/eap_sim_pcsc_card.c
@@ -70,8 +70,8 @@ static bool decode_imsi_ef(unsigned char *input, int input_len, char *output)
 		return FALSE;
 	}
 
-	/* Check type byte is IMSI */
-	if ((input[1] & 0xf) != 0x9)
+	/* Check type is IMSI (bottom 3 bits == 001) */
+	if ((input[1] & 0x7) != 0x1)
 	{
 		return FALSE;
 	}
_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to