Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/x509/certificate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
@doc false
# Returns a random serial number as an integer
def random_serial(size) do
<<i::unsigned-size(size)-unit(8)>> = :crypto.strong_rand_bytes(size)
<<i::unsigned-size(^size)-unit(8)>> = :crypto.strong_rand_bytes(size)

Check failure on line 371 in lib/x509/certificate.ex

View workflow job for this annotation

GitHub Actions / test (1.12, 24.3)

** (CompileError) lib/x509/certificate.ex:371: cannot use ^size outside of match clauses

Check failure on line 371 in lib/x509/certificate.ex

View workflow job for this annotation

GitHub Actions / test (1.14, 25.3)

** (CompileError) lib/x509/certificate.ex:371: cannot use ^size outside of match clauses

Check failure on line 371 in lib/x509/certificate.ex

View workflow job for this annotation

GitHub Actions / test (1.13, 25.0)

** (CompileError) lib/x509/certificate.ex:371: cannot use ^size outside of match clauses
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the use of the pin operator recommended in Elixir 1.20 is not supported by Elixir <=1.14. We can sidestep the issue altogether by using :binary.decode_unsigned/1.

i
end

Expand Down
Loading