Skip to content

Update CTN username retrieval#601

Merged
michalvasko merged 3 commits intodevelfrom
ctn-fix
Apr 23, 2026
Merged

Update CTN username retrieval#601
michalvasko merged 3 commits intodevelfrom
ctn-fix

Conversation

@Roytak
Copy link
Copy Markdown
Collaborator

@Roytak Roytak commented Apr 23, 2026

Try to obtain username from any cert in the chain, not just the one whose fingerprint matches. This process always starts from the peer cert. Required building the full chain in MbedTLS (OpenSSL does this by default).

Added a test and a new cert with a SAN field that tests having a cert chain with 2 certs, and if we set CTN's fingerprint to either, we should still use the client's cert with the SAN to resolve the username.

Fixes CESNET/netopeer2#1797

Roytak and others added 3 commits April 23, 2026 15:03
Instead of obtaining username only from the cert with matching
fingerprint, try to obtain it from the whole chain starting from the
client cert.

Also refactor the ctn code.

Fixes CESNET/netopeer2#1797
@michalvasko michalvasko merged commit 2d7a74b into devel Apr 23, 2026
11 checks passed
@michalvasko michalvasko deleted the ctn-fix branch April 23, 2026 13:17
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.

2 participants