Skip to content

libclamav/crypto: Use openssl parsing in cl_ASN1_GetTimeT() - #1731

Merged
val-ms merged 1 commit into
Cisco-Talos:mainfrom
sebastianas:ossl4
Jul 31, 2026
Merged

libclamav/crypto: Use openssl parsing in cl_ASN1_GetTimeT()#1731
val-ms merged 1 commit into
Cisco-Talos:mainfrom
sebastianas:ossl4

Conversation

@sebastianas

Copy link
Copy Markdown
Contributor

The ASN1_TIME type has been made opaque in OpenSSL 4.0

Replace the manual parsing of the string with ASN1_TIME_to_tm() which is available since openssl 1.1.1.

[ The last user has been removed in commit fa15aa9 ("bb11594 -
allow for compilation against openssl 1.1.0") so we might remove it
but it looks exported ]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 542cdf1fef

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread libclamav/crypto.c Outdated
@sebastianas

Copy link
Copy Markdown
Contributor Author

Hello!

@val-ms

val-ms commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@sebastianas Hello!

I'm sorry this is sitting! I'm overwhelmed with bug triage and patch release prep. I see you!

@sebastianas

sebastianas commented Jun 25, 2026 via email

Copy link
Copy Markdown
Contributor Author

@sebastianas

sebastianas commented Jul 7, 2026 via email

Copy link
Copy Markdown
Contributor Author

@val-ms

val-ms commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Yes! Sorry I missed it! I will investigate as soon as my meetings are done.

@val-ms

val-ms commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@sebastianas I don't see any issues with removing cl_ASN1_GetTimeT entirely:

  • delete the implementation from libclamav/crypto.c
  • delete the declaration/comment from libclamav/clamav.h
  • delete the export from libclamav/libclamav.map

We'll be bumping the SO major version for 1.6 anyways due to other backwards incompatible changes, but I will have to be sure to mention the API removal in 1.6.0 release notes when the time comes.

@sebastianas

sebastianas commented Jul 7, 2026 via email

Copy link
Copy Markdown
Contributor Author

The last user has been removed in commit fa15aa9 ("bb11594 - allow
for compilation against openssl 1.1.0"). This function is only exported
under CLAMAV_PRIVATE to be used within clamav, not by external users.

Removing the function will not cause an ABI break since it was not part
of the officially exported ABI. As a side effect it will compile against
OpenSSL 4.0 where the ASN1_TIME type has been made opaque.

Remove cl_ASN1_GetTimeT().

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

@val-ms val-ms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Thanks so much for your patience. I'll revisit the other PR soon.

@val-ms
val-ms merged commit 0097a6f into Cisco-Talos:main Jul 31, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants