zhlynn / zsign

Maybe it is the most quickly codesign alternative for iOS12+, cross-platform ( macOS, Linux , Windows ), more features.
BSD 3-Clause "New" or "Revised" License
1.27k stars 382 forks source link

ubuntu 22.10 sign error using enterprise certificate #299

Closed ikool-cn closed 1 year ago

ikool-cn commented 1 year ago
 /usr/local/bin/zsign -k ./cert/dev.p12 -p xxx -m ./cert/dev.mobileprovision -o ./output.ipa ./demo.ipa
40678956637F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode. Input type: PEM
40678956637F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode.  Input type: DER, Input structure: type-specific
40678956637F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode.  Input type: DER, Input structure: PrivateKeyInfo
40678956637F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode. Input type: DER
40678956637F0000:error:068000A8:asn1 encoding routines:asn1_check_tlen:wrong tag:../crypto/asn1/tasn_dec.c:1188:
40678956637F0000:error:0688010A:asn1 encoding routines:asn1_d2i_ex_primitive:nested asn1 error:../crypto/asn1/tasn_dec.c:752:
40678956637F0000:error:0688010A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:../crypto/asn1/tasn_dec.c:685:Field=pkey, Type=PKCS8_PRIV_KEY_INFO
40678956637F0000:error:068000A7:asn1 encoding routines:d2i_AutoPrivateKey_legacy:unsupported public key type:../crypto/asn1/d2i_pr.c:195:
40678956637F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:373:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()
>>> Can't Load P12 or PrivateKey File! Please Input The Correct File And Password!

But i can successfully sign on centos7 using the same certificate. What is the problem?

ikool-cn commented 1 year ago

Solved ! Just modify file /etc/ssl/openssl.cnf

Find the [default_sect] section and change it to:

[default_sect] activate = 1 [legacy_sect] activate = 1 Then find the [provider_sect] and use:

[provider_sect] default = default_sect legacy = legacy_sect