Skip to content

Commit

Permalink
apk2: add logging of min sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
jvehent committed Oct 8, 2019
1 parent 9a19cbd commit 56c6961
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion signer/apk2/apk2.go
Expand Up @@ -24,8 +24,13 @@ const (
// APK2Signer holds the configuration of the signer
type APK2Signer struct {
signer.Configuration

// minSdkVersion is the minimum Android SDK version the signed APK
// will be compatible with. We need this when using ECDSA keys that
// are only compatible with SDK>=18
minSdkVersion string
pkcs8Key []byte

pkcs8Key []byte
}

// New initializes an apk signer using a configuration
Expand Down Expand Up @@ -54,7 +59,9 @@ func New(conf signer.Configuration) (s *APK2Signer, err error) {
case *ecdsa.PrivateKey:
// ecdsa is only supported in sdk 18 and higher
s.minSdkVersion = "18"
log.Printf("apk2: setting min android sdk version to 18 as required to sign with ecdsa")
default:
log.Printf("apk2: setting min android sdk version to 9")
s.minSdkVersion = "9"
}
//apksigner wants a pkcs8 encoded privkey
Expand Down

0 comments on commit 56c6961

Please sign in to comment.