Skip to content

Conversation

Heyji2
Copy link

@Heyji2 Heyji2 commented Oct 12, 2025

otp.0.2

Time-base One Time Password (OTP) based on RFC6238 with an HMAC-SHA1 algorithm and a 6 digits code in OCAML
It relies on the Cryptokit library for cryptography operations, as well as the Base32
library for base32 encoding. The library generate a QR Code with the qrc library. It is
tested against all test vectors provided in RFC 6238 and the test suite provides as well
a dynamic test which requires the use of an client authenticator (like Google Authenticator
or Microsoft Authenticator) as a final test.



🐫 Pull-request generated by opam-publish v2.7.0

@Heyji2 Heyji2 force-pushed the opam-publish-otp.0.2 branch 3 times, most recently from 4ef05c9 to 39d044a Compare October 13, 2025 21:11
@mseri
Copy link
Member

mseri commented Oct 14, 2025

One test is still failing:

#=== ERROR while compiling otp.0.2 ============================================#
# context              2.4.1 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/Heyji2/otp/archive/refs/tags/0.2.tar.gz)
# path                 ~/.opam/4.14/.opam-switch/build/otp.0.2
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p otp -j 255 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/otp-7-1be6b5.env
# output-file          ~/.opam/log/otp-7-1be6b5.out
### output ###
# File "test/dune", line 3, characters 7-15:
# 3 |  (name test_OTP))
#            ^^^^^^^^
# (cd _build/default/test && ./test_OTP.exe)
# ...............
# Scannez le QRCode se trouve dans le fichier test.html avec un client OTP (type Microsoft Authenticator) et entrez le code totp pour CADAL : 
# E
# ==============================================================================
# Error: otp suite:15:authenticator test 1.
# 
# File "/home/opam/.opam/4.14/.opam-switch/build/otp.0.2/_build/default/test/oUnit-otp suite-builder#16.log", line 2, characters 1-1:
# Error: otp suite:15:authenticator test 1 (in the log).
# 
# Raised at Stdlib.input_line.scan in file "stdlib.ml", line 456, characters 14-31
# Called from Dune__exe__Test_OTP.test_authenticator in file "test/test_OTP.ml", line 45, characters 13-25
# Called from OUnitRunner.run_one_test.(fun) in file "src/lib/ounit2/advanced/oUnitRunner.ml", line 83, characters 13-26
# 
# End_of_file
# ------------------------------------------------------------------------------
# Ran: 16 tests in: 0.11 seconds.
# FAILED: Cases: 16 Tried: 16 Errors: 1 Failures: 0 Skip:  0 Todo: 0 Timeouts: 0.

Does it by chance require network access?

@Heyji2
Copy link
Author

Heyji2 commented Oct 15, 2025

It is a dynamic test (requires user interaction) so I will probably remove it.
Thanks for fixing the opam file with the outdated dune version.

@Heyji2 Heyji2 force-pushed the opam-publish-otp.0.2 branch 13 times, most recently from e6f23a9 to 3c705c1 Compare October 17, 2025 21:08
@jmid jmid mentioned this pull request Oct 17, 2025
@Heyji2 Heyji2 force-pushed the opam-publish-otp.0.2 branch 2 times, most recently from 6029ba1 to 65f8a1b Compare October 18, 2025 12:17
@Heyji2
Copy link
Author

Heyji2 commented Oct 18, 2025

I don't know how to solve the Wiundows CI / build issue. Trying to remove dependency from topkg, but without success...help needed.

@jmid
Copy link
Member

jmid commented Oct 18, 2025

The topkg issue is a known one #28636 and hence not a problem with your package.
It turns out it is an ocamlfind bug for which David opened a fix PR earlier today: ocaml/ocamlfind#112.
You can thus safely ignore the MSys2 failure. I would further suggest rolling back your local fix attempts, so that your package will work once the next, fixed ocamlfind is released.

@Heyji2
Copy link
Author

Heyji2 commented Oct 18, 2025

ok, thank you for this precision, I will remove my local fix.

I have another issue with the tests. It appears that there are some cyclic dependencies in some environments which I don't see how to solve and I don't want to exclude the tests from the package (I think they are useful).

@Heyji2 Heyji2 force-pushed the opam-publish-otp.0.2 branch from 65f8a1b to 9c1caca Compare October 18, 2025 17:45
@mseri
Copy link
Member

mseri commented Oct 18, 2025

That cyclic dependency issue can happen with the very old opam version tested there, don’t worry about it, there is no need to do anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants