Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source keystore file exists, but is empty #3

Open
denbard opened this issue Jun 16, 2017 · 4 comments
Open

Source keystore file exists, but is empty #3

denbard opened this issue Jun 16, 2017 · 4 comments

Comments

@denbard
Copy link

denbard commented Jun 16, 2017

i`m using following cmd to generate an android signature:
keytool-importkeypair -k demo.jks -p 123456 -pk8 platform.pk8 -cert platform.x509.pem -alias demo

demo.jks is generated from Android Studio.

And nothing occurs but an Exception:
keytool error: java.lang.Exception: Source keystore file exists, but is empty: /tmp/keytool-importkeypair.WmlH/p12

I scanned the folder /tmp/, find no folders named keytool-importkeypair,
so why this exception occurs?

@linq8261
Copy link

i got the same problem

[root@VM_16_15_centos linzq]# ./keytool-importkeypair -k demo.jks -p 123456 -pk8 platform.pk8 -cert platform.x509.pem -alias demo
Error decrypting key
140544181491616:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1199:
140544181491616:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS8_PRIV_KEY_INFO
unable to load private key
139677144197024:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY
Importing "rejia_door" with unable to load certificate
140634201495456:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: TRUSTED CERTIFICATE
keytool error: java.lang.Exception: Source keystore file exists, but is empty: /tmp/keytool-importkeypair.tZt7/p12
[root@VM_16_15_centos tmp]# pwd
/tmp
[root@VM_16_15_centos tmp]# ll
total 16
drwxr-xr-x 2 root root 4096 Jun 18 10:50 hsperfdata_root
drwx------ 2 root root 4096 Jun 18 10:22 ssh-3BtUsMVWPg
drwx------ 2 root root 4096 Jun 18 10:49 ssh-DbvcF2cVao
drwx------ 3 root root 4096 Jul  6  2018 systemd-private-1b11ce59a39e4260a53ff49aa11c35cd-ntpd.service-He16JV
[root@VM_16_15_centos tmp]# 

@DarrelAeturnum
Copy link

Any updates on this ?

@sjd168
Copy link

sjd168 commented Apr 18, 2020

Fixed: change the platform.pk8 and platform.x509.pem will ok.
And: the -k option is specificing a file which will be generate,not specificing a existing file.

@HilbertPan
Copy link

Fixed: change the platform.pk8 and platform.x509.pem will ok. And: the -k option is specificing a file which will be generate,not specificing a existing file.

能不能详细说下怎么解决的呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants