Pass NULL as other identity in EAP-AKA 3GPP2 to find a match with all plugins
[strongswan.git] / scripts / bin2array.c
index 015c2bd..5e0ad7c 100644 (file)
@@ -7,7 +7,7 @@
 int main(int argc, char *argv[])
 {
        int i, end = 0;
-       char byte;
+       unsigned char byte;
 
        printf("char %s[] = {\n", argc > 1 ? argv[1] : "data");
        while (1)
@@ -20,14 +20,14 @@ int main(int argc, char *argv[])
                                end = 1;
                                break;
                        }
-                       printf("0x%02x,", byte);
+                       printf("0x%02x,", (unsigned int)byte);
                }
                printf("\n");
                if (end)
                {
                        break;
                }
-       }       
+       }
        printf("};\n");
        return 0;
 }