FreeCalypso > hg > themwi-ota-tools
comparison smswrap/ota-smswrap-sjs1.c @ 3:8dfa3bfaa9c1
Sysmocom 2DES keys don't have correct parity
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Feb 2021 22:34:03 +0000 |
parents | d5e9af482548 |
children |
comparison
equal
deleted
inserted
replaced
2:d5e9af482548 | 3:8dfa3bfaa9c1 |
---|---|
41 unsigned n; | 41 unsigned n; |
42 | 42 |
43 rc = decode_hex_data_from_string(arg, keybin, 16, 16); | 43 rc = decode_hex_data_from_string(arg, keybin, 16, 16); |
44 if (rc < 0) | 44 if (rc < 0) |
45 exit(1); /* error msg already printed */ | 45 exit(1); /* error msg already printed */ |
46 for (n = 0; n < 2; n++) { | 46 for (n = 0; n < 2; n++) |
47 rc = DES_set_key_checked(keybin + n, sched + n); | 47 DES_set_key_unchecked(keybin + n, sched + n); |
48 if (rc < 0) { | |
49 fprintf(stderr, | |
50 "bad %s argument: DES_set_key_checked() returned %d on part %u\n", | |
51 name, rc, n); | |
52 exit(1); | |
53 } | |
54 } | |
55 } | 48 } |
56 | 49 |
57 read_payload() | 50 read_payload() |
58 { | 51 { |
59 int rc; | 52 int rc; |