• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zhaozg / lua-openssl / 30745147937
94%
master: 93%

Build:
Build:
LAST BUILD BRANCH: v0.x
DEFAULT BRANCH: master
Ran 02 Aug 2026 11:11AM UTC
Jobs 1
Files 45
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2026 11:04AM UTC coverage: 92.782% (-1.1%) from 93.913%
30745147937

push

travis-ci

zhaozg
fix(mac): reject update/final after final() to avoid meaningless tags

EVP_MAC_final() consumes the underlying EVP_MAC_CTX. For CMAC the final
operation is destructive: calling update() or final() again on the same
context silently returns a second tag that is not a valid MAC of anything
(verified on OpenSSL 3.6.3 - even a bare repeated final() returns a
different 16-byte value). This made mac_ctx lifecycle semantics surprising
and potentially unsafe for callers (issue #410).

The binding now tracks a finalized flag in the mac_ctx userdata (new
mac_ctx_ud wrapper):
* update() after final() -> nil, err, code
* final(last_data) after final() -> nil, err, code (implicit update)
* bare final() after final() -> nil, err, code (second tag is meaningless)
* dup() inherits the finalized state of the original context
* size()/mac()/params() remain available (pure queries)

Also fixed the final() documentation which claimed binary was the default
result format while the implementation returns hex by default.

Tests: 2.mac.lua now covers the finalized lifecycle for both CMAC and HMAC,
plus a known-answer check for the CMAC-AES-128 tag.

Fixes #410

9551 of 10294 relevant lines covered (92.78%)

1493.69 hits per line

Coverage Regressions

Lines Coverage ∆ File
29
93.63
-3.03% src/pkey.c
8
91.35
-6.09% src/ec.c
6
92.86
-3.25% src/rsa.c
5
0.0
-100.0% src/provider.c
4
94.87
-5.13% src/dh.c
2
93.48
-5.45% src/dsa.c
2
96.88
-3.13% src/hmac.c
1
94.12
-5.88% src/kdf.c
Jobs
ID Job ID Ran Files Coverage
1 30745147937.1 02 Aug 2026 11:13AM UTC 45
92.78
Travis Job
Source Files on build 30745147937
  • Tree
  • List 45
  • Changed 18
  • Source Changed 1
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6686b9b8 on github
  • Prev Build on v0.x (#30744753549)
  • Next Build on v0.x (#30746242581)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc