代码拉取完成,页面将自动刷新
package signingblock
import (
"crypto/x509"
"fmt"
)
type VerificationResult struct {
Certs [][]*x509.Certificate
SchemeId int
SigningLineage *V3SigningLineage
// When APK is signed with v3.1, the v3 result is stored here. Any v3 errors are lifted to the main Warnings/errors though
ExtraResults map[int]*VerificationResult
Frosting *FrostingResult
SourceStamp *SourceStampResult
// Extra blocks found in the signing block that are not used by apkverifier,
// either completely unknown, or those found in BlockId constants.
// Parsed block types (schemeV2, V3, play frosting..) will NOT be in this map.
// May be nil.
ExtraBlocks map[BlockId][]byte
Warnings []string
Errors []error
}
type FrostingResult struct {
Error error
KeySha256 string
ProtobufInfo []byte
}
type certAdder struct {
Certs []*x509.Certificate
res *VerificationResult
}
func (r *VerificationResult) addWarning(format string, args ...interface{}) {
r.Warnings = append(r.Warnings, fmt.Sprintf(format, args...))
}
func (r *VerificationResult) addError(format string, args ...interface{}) {
r.Errors = append(r.Errors, fmt.Errorf(format, args...))
}
func (r *VerificationResult) ContainsErrors() bool {
return len(r.Errors) != 0
}
func (r *VerificationResult) GetLastError() error {
if l := len(r.Errors); l != 0 {
return r.Errors[l-1]
}
return nil
}
func (r *VerificationResult) getCertAdder() certAdder {
return certAdder{
res: r,
}
}
func (a *certAdder) append(cert *x509.Certificate) {
a.Certs = append(a.Certs, cert)
if len(a.Certs) == 1 {
a.res.Certs = append(a.res.Certs, a.Certs)
} else {
idx := len(a.res.Certs) - 1
a.res.Certs[idx] = a.Certs
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。