Skip to content

Commit

Permalink
Correct debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgiepoo committed Nov 21, 2023
1 parent 3da4fd8 commit d10da5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generate_appcast/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func loadPrivateKeys(_ account: String, _ privateDSAKey: SecKey?, _ privateEdStr
if let data = Data(base64Encoded: encoded) {
secret = data
} else {
print("Error: Failed to base64 decode key pair data from keychain")
print("Error: Failed to base64 decode secret data from keychain")
return nil
}
} else {
Expand All @@ -57,7 +57,7 @@ func loadPrivateKeys(_ account: String, _ privateDSAKey: SecKey?, _ privateEdStr

if let secret {
guard let (privateKey, publicKey) = decodePrivateAndPublicKeys(secret: secret) else {
print("Error: Failed to decode private and public keys from keypair data")
print("Error: Failed to decode private and public keys from secret data")
return nil
}
privateEdKey = privateKey
Expand Down
4 changes: 2 additions & 2 deletions generate_keys/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ struct GenerateKeys: ParsableCommand {
/// Lookup mode - print just the pubkey and exit
if let secret = findSecret(account: account) {
guard let (_, pubKey) = decodePrivateAndPublicKeys(secret: secret) else {
failure("Stored private key must be 64 or 96 bytes (for the older format) decoded. Instead it is \(secret.count) bytes decoded.")
failure("Stored private key must be 32 or 96 bytes (for the older format) decoded. Instead it is \(secret.count) bytes decoded.")
}
print(pubKey.base64EncodedString())
} else {
Expand Down Expand Up @@ -257,7 +257,7 @@ struct GenerateKeys: ParsableCommand {
/// Default mode - find an existing public key and print its usage, or generate new keys
if let secret = findSecret(account: account) {
guard let (_, pubKey) = decodePrivateAndPublicKeys(secret: secret) else {
failure("Stored private key must be 64 or 96 bytes (for the older format) decoded. Instead it is \(secret.count) bytes decoded.")
failure("Stored private key must be 32 or 96 bytes (for the older format) decoded. Instead it is \(secret.count) bytes decoded.")
}

print("""
Expand Down

0 comments on commit d10da5e

Please sign in to comment.