我正在将CI流程从生成APK文件切换为App Bundle。我的管道中的一个阶段将在生成签名的二进制文件后,转储签名并在APK上验证签名,以确保签名正确,然后再继续。
library(car)
library(purrr)
library(boot)
set.seed(111)
## Reprex - Working
train_df1 <- data.frame(y = rnorm(10, mean = 10, sd = 2))
train_df1$x <- train_df1$y*1.5
train_df2 <- data.frame(y = rnorm(5, mean = 10, sd = 3))
train_df2$x <- train_df2$y*1.75
train_list <- list(train_df1, train_df2)
models_list <- train_list %>%
map(~lm(y ~ x, data = .))
car::Boot(object = models_list[[1]]) ## works fine
## Reprex - Not Working
n <- colnames(train_df1)
n <- trimws(n, "both")
f <- as.formula(paste("y ~", paste(n[!n %in% "y"], collapse = " + ")))
models_list <- train_list %>%
map(~lm(f, data = .)) ## error is due to using the "f" formula object instead of lm(y ~ x, data = .)
car::Boot(object = models_list[[1]]) ## error occurs here
#Error: object of type 'closure' is not subsettable
car::Boot(object = models_list[[2]])
#Error: object of type 'closure' is not subsettable
out <- models_list[[1]]
car::Boot(object = out)
#Error: object of type 'closure' is not subsettable
一旦产生了签名,就可以将签名转储到整个App Bundle中吗?
我尝试使用jarsigner,但最终得到数百行输出。
> apksigner verify --print-certs my-signed-binary.apk
Signer #1 certificate DN: CN=<NAME>, OU=<GROUP>, O=<COMPANY>, L=<CITY>, ST=<STATE>, C=<COUNTRY>
Signer #1 certificate SHA-256 digest: <DIGEST1>
Signer #1 certificate SHA-1 digest: <DIGEST2>
Signer #1 certificate MD5 digest: <DIGEST3>
此应用程序的最后一部分(“签名人...”)是整个App Bundle的签名吗?是否有比使用sed破解此输出更简单的方法来获取应用程序捆绑包的签名?
答案 0 :(得分:1)
我使用了 keytool 并且我认为它产生了正确的结果
keytool -printcert -jarfile my-signed-binary.aab