summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-slapi-plugins/libotp/libotp.h
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2014-05-23 13:01:59 -0400
committerMartin Kosek <mkosek@redhat.com>2014-06-25 14:22:01 +0200
commit7b15fcd57b06482be36e95e50cbec596777955b4 (patch)
tree97345a8957f29edbfd6e0bce40e35e0ba51fbc77 /daemons/ipa-slapi-plugins/libotp/libotp.h
parent6af1fc47636ea758c81dfd4351a41cddb452e266 (diff)
downloadfreeipa-7b15fcd57b06482be36e95e50cbec596777955b4.tar.gz
freeipa-7b15fcd57b06482be36e95e50cbec596777955b4.tar.xz
freeipa-7b15fcd57b06482be36e95e50cbec596777955b4.zip
Change OTPSyncRequest structure to use OctetString
This change has two motivations: 1. Clients don't have to parse the string. 2. Future token types may have new formats. Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins/libotp/libotp.h')
-rw-r--r--daemons/ipa-slapi-plugins/libotp/libotp.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/daemons/ipa-slapi-plugins/libotp/libotp.h b/daemons/ipa-slapi-plugins/libotp/libotp.h
index 7ed729337..24915f866 100644
--- a/daemons/ipa-slapi-plugins/libotp/libotp.h
+++ b/daemons/ipa-slapi-plugins/libotp/libotp.h
@@ -80,16 +80,14 @@ int otptoken_get_digits(struct otptoken *token);
/* Get the SDN of the token. */
const Slapi_DN *otptoken_get_sdn(struct otptoken *token);
-/* Validate the token code within a range of steps. */
-bool otptoken_validate(struct otptoken *token, size_t steps, uint32_t code);
-
/* Validate the token code within a range of steps. If tail is true,
* it will be assumed that the token is specified at the end of the string. */
-bool otptoken_validate_string(struct otptoken *token, size_t steps,
- const char *code, ssize_t len, bool tail);
+bool otptoken_validate_berval(struct otptoken *token, size_t steps,
+ const struct berval *code, bool tail);
/* Synchronize the token within a range of steps. */
-bool otptoken_sync(struct otptoken * const *tokens, size_t steps,
- uint32_t first_code, uint32_t second_code);
+bool otptoken_sync_berval(struct otptoken * const *tokens, size_t steps,
+ const struct berval *first_code,
+ const struct berval *second_code);
#endif /* LIBOTP_H_ */