diff options
| author | David M. Syzdek <david@syzdek.net> | 2023-01-10 11:48:02 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2023-01-10 11:48:02 -0900 |
| commit | 94d76e062f3440fd1e679a2a1205757c3da16b08 (patch) | |
| tree | 1657300ec762175e45501c4ea4d02c9b9afffbf0 | |
| parent | 3ca787ae855dc64377773d9b30697ca1e60a4569 (diff) | |
| download | otputils-94d76e062f3440fd1e679a2a1205757c3da16b08.tar.gz otputils-94d76e062f3440fd1e679a2a1205757c3da16b08.tar.bz2 otputils-94d76e062f3440fd1e679a2a1205757c3da16b08.tar.xz otputils-94d76e062f3440fd1e679a2a1205757c3da16b08.zip | |
libotputil: renaming otputil_dict_rfc1760 to otputil_skey_rfc1760_dict
| -rw-r--r-- | lib/libotputil/libotputil.sym | 2 | ||||
| -rw-r--r-- | lib/libotputil/lotp-rfc2289.c | 20 | ||||
| -rw-r--r-- | lib/libotputil/lskey-rfc1760-dict.c | 4 | ||||
| -rw-r--r-- | lib/libotputil/lskey-rfc1760-dict.h | 2 | ||||
| -rw-r--r-- | src/otp-altdict.c | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/lib/libotputil/libotputil.sym b/lib/libotputil/libotputil.sym index 9d9e448..dac3069 100644 --- a/lib/libotputil/libotputil.sym +++ b/lib/libotputil/libotputil.sym | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | # libtool --mode=clean rm -f libotputil.la libotputil.lo | 53 | # libtool --mode=clean rm -f libotputil.la libotputil.lo |
| 54 | # | 54 | # |
| 55 | # variables | 55 | # variables |
| 56 | otputil_dict_rfc1760 | 56 | otputil_skey_rfc1760_dict |
| 57 | # | 57 | # |
| 58 | # BER functions | 58 | # BER functions |
| 59 | otputil_base32bv | 59 | otputil_base32bv |
diff --git a/lib/libotputil/lotp-rfc2289.c b/lib/libotputil/lotp-rfc2289.c index 7b6a6d6..99f8b95 100644 --- a/lib/libotputil/lotp-rfc2289.c +++ b/lib/libotputil/lotp-rfc2289.c | |||
| @@ -239,7 +239,7 @@ otputil_otp_encode( | |||
| 239 | // byte 1: ( 00000000111 11111------ ) | 239 | // byte 1: ( 00000000111 11111------ ) |
| 240 | case 8: | 240 | case 8: |
| 241 | val |= (bv_val[pos] >> 5) & 0x0007; | 241 | val |= (bv_val[pos] >> 5) & 0x0007; |
| 242 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 242 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 243 | return(NULL); | 243 | return(NULL); |
| 244 | val = (bv_val[pos] << 6) & 0x7C0; | 244 | val = (bv_val[pos] << 6) & 0x7C0; |
| 245 | break; | 245 | break; |
| @@ -247,7 +247,7 @@ otputil_otp_encode( | |||
| 247 | // byte 2: ( 11111222222 22--------- ) | 247 | // byte 2: ( 11111222222 22--------- ) |
| 248 | case 5: | 248 | case 5: |
| 249 | val |= (bv_val[pos] >> 2) & 0x003f; | 249 | val |= (bv_val[pos] >> 2) & 0x003f; |
| 250 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 250 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 251 | return(NULL); | 251 | return(NULL); |
| 252 | val = (bv_val[pos] << 9) & 0x07C0; | 252 | val = (bv_val[pos] << 9) & 0x07C0; |
| 253 | break; | 253 | break; |
| @@ -260,7 +260,7 @@ otputil_otp_encode( | |||
| 260 | // byte 4: ( 22333333334 4444444---- ) | 260 | // byte 4: ( 22333333334 4444444---- ) |
| 261 | case 10: | 261 | case 10: |
| 262 | val |= (bv_val[pos] >> 7) & 0x0001; | 262 | val |= (bv_val[pos] >> 7) & 0x0001; |
| 263 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 263 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 264 | return(NULL); | 264 | return(NULL); |
| 265 | val = (bv_val[pos] << 4) & 0x07F0; | 265 | val = (bv_val[pos] << 4) & 0x07F0; |
| 266 | break; | 266 | break; |
| @@ -268,7 +268,7 @@ otputil_otp_encode( | |||
| 268 | // byte 5: ( 44444445555 5555------- ) | 268 | // byte 5: ( 44444445555 5555------- ) |
| 269 | case 7: | 269 | case 7: |
| 270 | val |= (bv_val[pos] >> 4) & 0x000f; | 270 | val |= (bv_val[pos] >> 4) & 0x000f; |
| 271 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 271 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 272 | return(NULL); | 272 | return(NULL); |
| 273 | val = (bv_val[pos] << 7) & 0x0780; | 273 | val = (bv_val[pos] << 7) & 0x0780; |
| 274 | break; | 274 | break; |
| @@ -276,7 +276,7 @@ otputil_otp_encode( | |||
| 276 | // byte 6: ( 55556666666 6---------- ) | 276 | // byte 6: ( 55556666666 6---------- ) |
| 277 | case 4: | 277 | case 4: |
| 278 | val |= (bv_val[pos] >> 1) & 0x007f; | 278 | val |= (bv_val[pos] >> 1) & 0x007f; |
| 279 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 279 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 280 | return(NULL); | 280 | return(NULL); |
| 281 | val = (bv_val[pos] << 10) & 0x0400; | 281 | val = (bv_val[pos] << 10) & 0x0400; |
| 282 | break; | 282 | break; |
| @@ -289,7 +289,7 @@ otputil_otp_encode( | |||
| 289 | // byte 8: ( 67777777788 888888----- ) | 289 | // byte 8: ( 67777777788 888888----- ) |
| 290 | case 9: | 290 | case 9: |
| 291 | val |= (bv_val[pos] >> 6) & 0x0003; | 291 | val |= (bv_val[pos] >> 6) & 0x0003; |
| 292 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 292 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 293 | return(NULL); | 293 | return(NULL); |
| 294 | val = (bv_val[pos] << 5) & 0x07e0; | 294 | val = (bv_val[pos] << 5) & 0x07e0; |
| 295 | break; | 295 | break; |
| @@ -297,7 +297,7 @@ otputil_otp_encode( | |||
| 297 | // byte 9: ( 88888899999 999-------- ) | 297 | // byte 9: ( 88888899999 999-------- ) |
| 298 | case 6: | 298 | case 6: |
| 299 | val |= (bv_val[pos] >> 3) & 0x001f; | 299 | val |= (bv_val[pos] >> 3) & 0x001f; |
| 300 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 300 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 301 | return(NULL); | 301 | return(NULL); |
| 302 | val = (bv_val[pos] << 8) & 0x0700; | 302 | val = (bv_val[pos] << 8) & 0x0700; |
| 303 | break; | 303 | break; |
| @@ -305,7 +305,7 @@ otputil_otp_encode( | |||
| 305 | // byte 10: ( 999aaaaaaaa ----------- ) | 305 | // byte 10: ( 999aaaaaaaa ----------- ) |
| 306 | case 3: | 306 | case 3: |
| 307 | val |= bv_val[pos] & 0x00ff; | 307 | val |= bv_val[pos] & 0x00ff; |
| 308 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 308 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 309 | return(NULL); | 309 | return(NULL); |
| 310 | break; | 310 | break; |
| 311 | 311 | ||
| @@ -340,7 +340,7 @@ otputil_otp_encode( | |||
| 340 | // byte 4: ( 2233333333x x---------- ) | 340 | // byte 4: ( 2233333333x x---------- ) |
| 341 | case 10: | 341 | case 10: |
| 342 | val |= (checksum >> 1) & 0x0001; | 342 | val |= (checksum >> 1) & 0x0001; |
| 343 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, " ") == -1) | 343 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, " ") == -1) |
| 344 | return(NULL); | 344 | return(NULL); |
| 345 | val = (checksum << 10) & 0x0400; | 345 | val = (checksum << 10) & 0x0400; |
| 346 | break; | 346 | break; |
| @@ -378,7 +378,7 @@ otputil_otp_encode( | |||
| 378 | default: | 378 | default: |
| 379 | break; | 379 | break; |
| 380 | }; | 380 | }; |
| 381 | if (otputil_otp_encode_word(dst, otputil_dict_rfc1760[val], dstlen, NULL) == -1) | 381 | if (otputil_otp_encode_word(dst, otputil_skey_rfc1760_dict[val], dstlen, NULL) == -1) |
| 382 | return(NULL); | 382 | return(NULL); |
| 383 | 383 | ||
| 384 | return(dst); | 384 | return(dst); |
diff --git a/lib/libotputil/lskey-rfc1760-dict.c b/lib/libotputil/lskey-rfc1760-dict.c index e6217c9..1fc3709 100644 --- a/lib/libotputil/lskey-rfc1760-dict.c +++ b/lib/libotputil/lskey-rfc1760-dict.c | |||
| @@ -41,8 +41,8 @@ | |||
| 41 | ///////////////// | 41 | ///////////////// |
| 42 | #pragma mark - Variables | 42 | #pragma mark - Variables |
| 43 | 43 | ||
| 44 | #pragma mark otputil_dict_rfc1760[] | 44 | #pragma mark otputil_skey_rfc1760_dict[] |
| 45 | const char * otputil_dict_rfc1760[] = | 45 | const char * otputil_skey_rfc1760_dict[] = |
| 46 | { | 46 | { |
| 47 | // | 47 | // |
| 48 | // Haller [Page 6] | 48 | // Haller [Page 6] |
diff --git a/lib/libotputil/lskey-rfc1760-dict.h b/lib/libotputil/lskey-rfc1760-dict.h index db2d03c..cf4402a 100644 --- a/lib/libotputil/lskey-rfc1760-dict.h +++ b/lib/libotputil/lskey-rfc1760-dict.h | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | ///////////////// | 51 | ///////////////// |
| 52 | #pragma mark - Variables | 52 | #pragma mark - Variables |
| 53 | 53 | ||
| 54 | extern const char * otputil_dict_rfc1760[]; | 54 | extern const char * otputil_skey_rfc1760_dict[]; |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | #endif /* end of header file */ | 57 | #endif /* end of header file */ |
diff --git a/src/otp-altdict.c b/src/otp-altdict.c index dcc480d..89a8f41 100644 --- a/src/otp-altdict.c +++ b/src/otp-altdict.c | |||
| @@ -146,7 +146,7 @@ struct _my_config | |||
| 146 | ///////////////// | 146 | ///////////////// |
| 147 | #pragma mark - Variables | 147 | #pragma mark - Variables |
| 148 | 148 | ||
| 149 | extern const char * otputil_dict_rfc1760[]; | 149 | extern const char * otputil_skey_rfc1760_dict[]; |
| 150 | 150 | ||
| 151 | 151 | ||
| 152 | ////////////////// | 152 | ////////////////// |
| @@ -588,7 +588,7 @@ my_buff_process_word( | |||
| 588 | // search for S/KEY dictionary word | 588 | // search for S/KEY dictionary word |
| 589 | if (!(cnf->allow_dups)) | 589 | if (!(cnf->allow_dups)) |
| 590 | { | 590 | { |
| 591 | if (bindle_bindex(word, otputil_dict_rfc1760, 2048, sizeof(char *), 0, NULL, my_word_cmp_key) != -1) | 591 | if (bindle_bindex(word, otputil_skey_rfc1760_dict, 2048, sizeof(char *), 0, NULL, my_word_cmp_key) != -1) |
| 592 | { | 592 | { |
| 593 | my_verbose(cnf, "word '%s': is contained in S/KEY dictionary\n", word); | 593 | my_verbose(cnf, "word '%s': is contained in S/KEY dictionary\n", word); |
| 594 | return(0); | 594 | return(0); |
