Debian Codegraph @

debian/patches/apkverifier-bin.patch

raw symbols SCIP
1 Description: example code from upstream's README.md
2 --- /dev/null
3 +++ b/apkverifier/main.go
4 @@ -0,0 +1,22 @@
5 +package main
6 +
7 +import (
8 + "fmt"
9 + "github.com/avast/apkverifier"
10 + "os"
11 +)
12 +
13 +func main() {
14 + res, err := apkverifier.Verify(os.Args[1], nil)
15 + if err != nil {
16 + fmt.Fprintf(os.Stderr, "Verification failed: %s\n", err.Error())
17 + }
18 +
19 + fmt.Printf("Verification scheme used: v%d\n", res.SigningSchemeId)
20 + cert, _ := apkverifier.PickBestApkCert(res.SignerCerts)
21 + if cert == nil {
22 + fmt.Printf("No certificate found.\n")
23 + } else {
24 + fmt.Println(cert)
25 + }
26 +}