Skip to content

Conversation

@ziopio
Copy link
Member

@ziopio ziopio commented Nov 18, 2025

Problem

This PR tries to fix #13
We need to run different code on 28 as the old internal module does not exist anymore.

Solution

We have more stuff available in public_key so I use the public API when possible.
For a couple of other types, I need to switch to a new internal module.

CertificateSerialNumber -> CRLNumber

By changing type, is possible to use the public_key API public_key:der_encode
Looks safe to use on both 27 and 28

InvalidityDate

From OTP 28 it is available in public_key api

Ia5String

Can be encoded as 'OTP-PKIX':encode('OTPDisplayText', {ia5String, String}),

OID (ObjectIdentifier)

We can use CertPolicyId as 'OTP-PKIX':encode('CertPolicyId', OId),

Tests

I manually tested grisp board connections to grisp.io, both with latest OTP 27 and OTP 28 👍

@ziopio ziopio mentioned this pull request Nov 20, 2025
@ziopio ziopio changed the title Remove OTP-PUB-KEY dependency Encode ASN.1 types differently, on OTP >= 28 Feb 6, 2026
Keep the old code to maintain backward compatibility
@ziopio ziopio requested a review from GalaxyGorilla February 6, 2026 15:21
@ziopio ziopio marked this pull request as ready for review February 6, 2026 15:24
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.

Broken on OTP 28

1 participant