Skip to content

Conversation

@vcsjones
Copy link
Member

@vcsjones vcsjones commented Nov 5, 2024

AppleCertificatePal.TryDecodePem can use the UTF-8 decoder. This extends out PemEnumerator to work on UTF-8 inputs.

internal delegate bool DerCallback(ReadOnlySpan<byte> derData, X509ContentType contentType);

internal static bool TryDecodePem(ReadOnlySpan<byte> rawData, DerCallback derCallback)
internal static void TryDecodePem(ReadOnlySpan<byte> rawData, Func<ReadOnlySpan<byte>, X509ContentType, bool> derCallback)
Copy link
Member Author

Choose a reason for hiding this comment

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

The return value from this method was always ignored and seemed to have no purpose any more. So it became void.

{
internal sealed partial class AppleCertificatePal : ICertificatePal
{
internal delegate bool DerCallback(ReadOnlySpan<byte> derData, X509ContentType contentType);
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need a dedicated delegate anymore with allows ref struct on Func now, so use Func.

@vcsjones
Copy link
Member Author

vcsjones commented Nov 5, 2024

/azp run runtime-extra-platforms

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bartonjs
Copy link
Member

bartonjs commented Nov 6, 2024

Since it's marked as Draft I just skimmed, but it looks good, conceptually.

@vcsjones vcsjones marked this pull request as ready for review November 6, 2024 02:59
@vcsjones
Copy link
Member Author

vcsjones commented Nov 6, 2024

Marked as draft while I waited for CI in case I needed to make changes since I don't have iOS tests working locally.

Failures from runtime-extra-platforms appear unrelated, so marked ready for review.

@bartonjs bartonjs merged commit f697b53 into dotnet:main Nov 7, 2024
83 checks passed
@vcsjones vcsjones deleted the ios-apple-pem branch November 7, 2024 23:40
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants