veehaitch/devicecheck-appattest

Correctness of `AttestationValidatorImpl.validateAsync`

Closed this issue · 2 comments

Hi!

I do not fully grasp some of the intricacies of how the validateAsync function of AttestationValidatorImpl works with couroutines:

1 .What happens id any of lauched child coroutines take longer than the slowes the aysnc produces results? I'd assume that validateAsync returns successfully, not having completed all checks. Is that correct?
2. Any of the launched coroutines throwing an exception should cause the function as a whole to throw an exceptions, since launch is not used to create a root coroutine. Is that the reason for encapsulating the whole body in a coroutineScope?

Otherwise the code is easily comprehensible and a breeze to compare with Apple's documentation!

Hey there! Thanks for opening this issue to challenge the correctness of what this library does. It's highly appreciated.

As far as I can tell, you might not be familiar with Kotlin's approach to structured concurrency. I'd like to invite you to revise your questions with structured concurrency in mind as I assume it resolves both of your questions. If not, I'm looking forward to reading more of your thoughts!

Well, it seems like I was less familiar than i thought ;-) Thanks!