Skip to content

Conversation

@reneme
Copy link
Collaborator

@reneme reneme commented Jan 12, 2026

This adds functions to query the number of entries in index-based enumerator functions that were introduced recently in #5220 and #5217 as suggested.

This adds functions to query the number of entries in index-based
enumerator functions that were introduced recently.

This comment was marked as resolved.

Copy link
Owner

@randombit randombit left a comment

Choose a reason for hiding this comment

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

I thought about asking about this in the original PR but thought maybe the usage pattern would be to just realloc as you go until you get the no-more-data error code. But knowing the count in advance allows preallocation which probably makes life a bit easier for the C programmers...

@arckoor
Copy link
Contributor

arckoor commented Jan 13, 2026

While you're at it, could you add botan_x509_cert_get_issuer_dn_count and botan_x509_cert_get_subject_dn_count? These two were introduced in 2.0, and also have that behaviour, but aren't exposed in botan-rs yet so I still have the chance to use the nicer api there :p

@reneme
Copy link
Collaborator Author

reneme commented Jan 13, 2026

While you're at it, could you add botan_x509_cert_get_issuer_dn_count and botan_x509_cert_get_subject_dn_count?

I'll do a follow-up PR. Edit: #5234.

@reneme reneme merged commit cc836e3 into randombit:master Jan 13, 2026
52 checks passed
@reneme reneme deleted the feature/ffi_count_functions branch January 13, 2026 07:45
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