Skip to content

public_key: Add missing macros #9865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: maint
Choose a base branch
from

Conversation

IngelaAndin
Copy link
Contributor

closes #9857

Copy link
Contributor

github-actions bot commented May 22, 2025

CT Test Results

  2 files   17 suites   4m 18s ⏱️
285 tests 281 ✅ 4 💤 0 ❌
301 runs  297 ✅ 4 💤 0 ❌

Results for commit 8445094.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@IngelaAndin IngelaAndin self-assigned this May 23, 2025
@IngelaAndin IngelaAndin added team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels May 23, 2025
@IngelaAndin IngelaAndin requested a review from dgud May 23, 2025 07:18
dgud
dgud previously approved these changes May 23, 2025
@IngelaAndin IngelaAndin force-pushed the ingela/public_key/macros/OTP-19644 branch 2 times, most recently from d7e729b to 64c3a55 Compare May 27, 2025 11:42
@IngelaAndin IngelaAndin requested a review from dgud May 27, 2025 11:43
@IngelaAndin IngelaAndin force-pushed the ingela/public_key/macros/OTP-19644 branch 2 times, most recently from 5b84b31 to 17a932a Compare May 28, 2025 14:55
@CLAassistant
Copy link

CLAassistant commented May 28, 2025

CLA assistant check
All committers have signed the CLA.

@IngelaAndin IngelaAndin force-pushed the ingela/public_key/macros/OTP-19644 branch from 17a932a to 8445094 Compare May 28, 2025 15:03
get_asn1_module('FreshestCRL') -> 'PKIX1Implicit-2009';
get_asn1_module('IssuingDistributionPoint') -> 'PKIX1Implicit-2009';
get_asn1_module('GeneralNames') -> 'PKIX1Implicit-2009';
get_asn1_module('Validity') -> 'PKIX1Implicit-2009';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
get_asn1_module('Validity') -> 'PKIX1Implicit-2009';
get_asn1_module('Validity') -> 'PKIX1Explicit-2009';

get_asn1_module('Certificate') -> 'PKIX1Explicit-2009';
get_asn1_module('SubjectAltName') -> 'PKIX1Implicit-2009';
Copy link
Contributor

Choose a reason for hiding this comment

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

So this would be nice: to be able to call public_key:der_encode('SubjectAltName', SANExtension). I use that to include a SubjectAltName extension in a CSR extensionRequest.

Unfortunately PKIX1Implicit-2009 does not define the necessary enc_SubjectAltName/2 function, so this fails with {:error, {:asn1, {{:undefined_type, :SubjectAltName}, ...}. There is enc_ext-SubjectAltName/2, though.

There seem to be some inconsistencies in this respect for various certificate extensions. For example, AuthorityKeyIdentifier and SubjectKeyIdentifier do expose enc_Xxx and dec_Xxx functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants