Skip to content

Commit

Permalink
Fix a small error in AlgorithmIdentifier description and add missing …
Browse files Browse the repository at this point in the history
…cases
  • Loading branch information
baarde committed Jan 19, 2025
1 parent 88ced31 commit 44be8fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/X509/X509BaseTypes/AlgorithmIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ extension AlgorithmIdentifier: CustomStringConvertible {
return "ecdsaWithSHA384"
case .ecdsaWithSHA512:
return "ecdsaWithSHA512"
case .sha1WithRSAEncryption, .sha1WithRSAEncryptionUsingNil:
return "sha1WithRSAEncryption"
case .sha256WithRSAEncryption, .sha256WithRSAEncryptionUsingNil:
return "sha256WithRSAEncryption"
case .sha384WithRSAEncryption, .sha384WithRSAEncryptionUsingNil:
return "sha384WithRSAEncryption"
case .p521PublicKey, .sha512WithRSAEncryptionUsingNil:
case .sha512WithRSAEncryption, .sha512WithRSAEncryptionUsingNil:
return "sha512WithRSAEncryption"
case .sha1, .sha1UsingNil:
return "sha1"
Expand All @@ -245,6 +247,8 @@ extension AlgorithmIdentifier: CustomStringConvertible {
return "sha384"
case .sha512, .sha512UsingNil:
return "sha512"
case .ed25519:
return "ed25519"
default:
return "AlgorithmIdentifier(\(self.algorithm) - \(String(reflecting: self.parameters)))"
}
Expand Down

0 comments on commit 44be8fa

Please sign in to comment.