丢失代码签名证书别名

发布于 2024-09-17 20:56:32 字数 139 浏览 11 评论 0原文

我们公司几周前从 Thawte 购买了代码签名证书。当我们最终从采购团队收到证书时,他们不知道证书的别名!

我似乎无法在没有别名的情况下导入证书,而且他们根本不知道它是什么。有没有办法检索别名?还有其他人遇到过这个问题吗?有没有没有别名的导入方法?

Our company purchased a code signing certificate from Thawte a few weeks ago. When we finally received the certificate from the purchasing team they didn't know the alias for the certificate!

I don't seem to be able to import the cert without the alias and they have no clue at all what it is. Is there a way of retrieving the alias? Has anybody else run into this problem? Is there any way of importing without the alias?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

躲猫猫 2024-09-24 20:56:33

别名是在创建 RSA 证书私钥时指定的。它不是由证书签名机构决定,而是由创建私钥和公钥的人决定。

我无法谈论您的采购部门是否应该知道这一点,但您需要与生成 CSR 的人员/部门核实,以确定用于生成 CSR 的工具包以及密钥存储格式。

现在,假设使用 Java keytool 实用程序创建 CSR,并且私钥在 JKS 密钥库中管理,您可以使用 keytool 命令来确定密钥库的内容(以及别名)。这可以使用 keytool -list 来完成,如其他答案中所示。下面演示了一个示例运行,别名出现在输出中:

keytool -list -v -keystore foo.jks
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: foo
Creation date: Sep 1, 2010
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=foo, OU=foo, O=foo, L=foo, ST=foo, C=foo
Issuer: CN=foo, OU=foo, O=foo, L=foo, ST=foo, C=foo

请注意,您不需要知道密钥库密码即可读取密钥库的内容,在这种情况下,将显示警告。

如果您使用其他工具包和/或密钥库格式,则需要采用类似的方法来确定密钥库的内容,因为别名不一定会出现在 CSR 中。

The alias is specified during the creation of the private key of the RSA certificate. It is not decided by the certificate signing authority, rather by the person creating the private and public keys.

I can't speak on whether your purchasing department ought to know this, but you'll need to check with the person/department who generated the CSR to determine the toolkit used to generate the CSR, and the key store format.

Now, assuming that the Java keytool utility was utilized to create the CSR, and that the private key is managed in a JKS keystore, you can utilize the keytool command to determine the contents (and hence the alias) of the keystore. This can be done using the keytool -list as indicated in the other answer. A sample run is demonstrated below, with the alias appearing in the output:

keytool -list -v -keystore foo.jks
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: foo
Creation date: Sep 1, 2010
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=foo, OU=foo, O=foo, L=foo, ST=foo, C=foo
Issuer: CN=foo, OU=foo, O=foo, L=foo, ST=foo, C=foo

Note that you do not need to know the keystore password to read the contents of the keystore, in which case a warning will be displayed.

In case you are using another toolkit and/or keystore format, you'll need to adopt a similar approach to determine the contents of the keystore, for the alias is not bound to appear in the CSR.

迷你仙 2024-09-24 20:56:33

尝试使用:(

keytool -list -keystore certificate.jks

请注意,如果您的密钥库不是 JKS,例如 PKCS12,您可以添加可选的 -storetype 选项来更改密钥库类型:)

keytool -list -keystore certificate.p12 -storetype PKCS12

您将得到类似以下内容的内容:

密钥库类型:JKS
密钥库提供商:SUN

您的密钥库包含 1 个条目

mykey,2010 年 2 月 1 日,trustedCertEntry,
证书指纹(MD5):0F:73:59:5C:35:8C:F2:F0:27:7E:F7:B7:AF:0A:95:B4

您的证书别名显示在证书说明的第一行,这里是“mykey”。

Try with:

keytool -list -keystore certificate.jks

(Note that if your keystore isn't JKS, for example, PKCS12, you can add an optional -storetype option to change the keystore type:)

keytool -list -keystore certificate.p12 -storetype PKCS12

You'll have something like:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

mykey, Feb 1, 2010, trustedCertEntry,
Certificate fingerprint (MD5): 0F:73:59:5C:35:8C:F2:F0:27:7E:F7:B7:AF:0A:95:B4

Your certificate alias is shown on the first line of the certificate description, here 'mykey'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文