Skip to content

Conversation

DaVinci9196
Copy link
Contributor

@DaVinci9196 DaVinci9196 commented Aug 23, 2025

Comment on lines +220 to 223
// Default: SHA-256
val digest = context.packageManager.getFirstSignatureDigest(packageName, "SHA-256")
?: throw RequestHandlingException(NOT_ALLOWED_ERR, "Unknown package $packageName")
return "android:apk-key-hash:${digest.toBase64(HASH_BASE64_FLAGS)}"
Copy link
Member

Choose a reason for hiding this comment

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

This seems wrong. It should be either android:apk-key-hash:<sha-1> or android:apk-key-hash-sha256:<sha-256>, but not a mix.

Choose a reason for hiding this comment

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

I also noticed this, but in the fido specification, the pr server recognizes SHA-256

"android:apk-key-hash:${firstSignature.digest("SHA1").toBase64(HASH_BASE64_FLAGS)}"
}
"android:apk-key-hash:$sha1BASE64" -> "android:apk-key-hash-sha256:$sha256BASE64"
"android:apk-key-hash:$sha256BASE64" -> "android:apk-key-hash-sha256:$sha256BASE64"
Copy link
Member

Choose a reason for hiding this comment

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

And you need this here, because you wrongly created it above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed sha-1 related.

@ale5000-git ale5000-git linked an issue Sep 29, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AuthenticationExtensionsClientOutputs is missing getCredProps()
3 participants