diff options
| author | David M. Syzdek <david@syzdek.net> | 2023-01-12 15:16:58 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2023-01-12 15:28:31 -0900 |
| commit | 99a64f4d6d075e33be4b951d456996d5d6458380 (patch) | |
| tree | db925aad9ea21434f81dd8503ac6cce6f7c61777 /lib/libotputil/lrfc2289-otp.c | |
| parent | 6a6d1f9911a5b48cb2ba4863c04f7239fa1d1f10 (diff) | |
| download | otputils-99a64f4d6d075e33be4b951d456996d5d6458380.tar.gz otputils-99a64f4d6d075e33be4b951d456996d5d6458380.tar.bz2 otputils-99a64f4d6d075e33be4b951d456996d5d6458380.tar.xz otputils-99a64f4d6d075e33be4b951d456996d5d6458380.zip | |
libotputil: adding defaults to otputil_otp_code()
Diffstat (limited to 'lib/libotputil/lrfc2289-otp.c')
| -rw-r--r-- | lib/libotputil/lrfc2289-otp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libotputil/lrfc2289-otp.c b/lib/libotputil/lrfc2289-otp.c index 1ba7828..6a47463 100644 --- a/lib/libotputil/lrfc2289-otp.c +++ b/lib/libotputil/lrfc2289-otp.c | |||
| @@ -86,6 +86,9 @@ otputil_otp_code( | |||
| 86 | 86 | ||
| 87 | assert(otp_pass != NULL); | 87 | assert(otp_pass != NULL); |
| 88 | 88 | ||
| 89 | otp_seq = (otp_seq >= 0) ? otp_seq : otputil_defaults.otp_seq; | ||
| 90 | otp_hash = ((otp_hash)) ? otp_hash : otputil_defaults.otp_hash; | ||
| 91 | |||
| 89 | // check otp_seed | 92 | // check otp_seed |
| 90 | secret[0] = '\0'; | 93 | secret[0] = '\0'; |
| 91 | if ((otp_seed)) | 94 | if ((otp_seed)) |
