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

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

Build:
Build:
LAST BUILD BRANCH: v0.x
DEFAULT BRANCH: master
Ran 02 Aug 2026 11:00AM 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 10:51AM UTC coverage: 93.913% (+0.08%) from 93.832%
30744753549

push

travis-ci

zhaozg
fix(cms): accept nil certs in cms.sign and guard empty-CMS methods

Two crash/UX issues reported against the cms module:

#411: cms.sign(signer, pkey, data) raised
  'bad argument #4 to sign (must be a table as array or nil)' even though
  nil is documented as acceptable. The TAB2SK macro (sk.h) that converts
  Lua tables to STACK_OF(X509) forced a table via luaL_argcheck while its
  message promised nil was fine. The check now accepts none/nil and the
  macro returns an empty stack, so every module built on openssl_sk_*_fromtable
  (cms, pkcs7, pkcs12, ocsp, ots, x509) accepts nil for optional cert lists.

#413: cms.new():detached(true)/detached()/content()/final("hi") segfaulted.
  CMS_ContentInfo_new() creates an object with no contentType set, and the
  OpenSSL accessors CMS_get0_content/CMS_is_detached/CMS_set_detached/CMS_final
  do not handle that case. Added cms_has_content_type() guard:
  * detached() getter returns false on empty CMS
  * detached(true)/final() return nil, err, code on empty CMS
  * content() returns nil on empty CMS
  * detached setter also now returns openssl_pushresult() instead of
    returning an uninitialized stack value

Tests cover both regressions (test/6.cms.lua:testSignNoCerts, testEmptyObject).
Verified against OpenSSL 1.0.2 and 3.6.

Fixes #411, #413

16 of 16 new or added lines in 1 file covered. (100.0%)

17 existing lines in 1 file now uncovered.

10584 of 11270 relevant lines covered (93.91%)

1999.54 hits per line

Coverage Regressions

Lines Coverage ∆ File
17
95.61
2.13% src/cms.c
Jobs
ID Job ID Ran Files Coverage
1 30744753549.1 02 Aug 2026 11:02AM UTC 45
93.91
Travis Job
Source Files on build 30744753549
  • Tree
  • List 45
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 60fa80b2 on github
  • Prev Build on v0.x (#30744082811)
  • Next Build on v0.x (#30745147937)
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