如何在 Android 上使用 KeyStore 创建证书签名请求?

2022-01-25 00:00:00 ssl ssl-certificate android java pkcs#10

我正在使用 KeyStore 在 Android 应用程序中生成 SSL 密钥对 API.我想从公钥/私钥对创建证书签名请求 (CSR),以便将其发送到外部 CA 进行签名.

I'm generating a SSL KeyPair in an Android app using the KeyStore API. I want to create a Certificate Signing Request (CSR) from the Public/Private key pair so that it can be sent to an external CA for signing.

这可能吗?如果可能的话,我想使用内置的 Android 库而不是 BouncyCastle,以便让 Android 安全地存储密钥.

Is this possible? I'd like to use the builtin Android libraries rather than BouncyCastle if possible, in order to have Android store the keys securely.

推荐答案

证书注册流程

检查此链接.它生成密钥对和 CSR.关于在 android 手机上生成 CSR(证书签名请求),我认为使用 Spongycastle 相当简单.它是 Bouncycastle 的 android 端口.

Check this link. It generate key pair and CSR. Regarding generating a CSR (certificate sign request) on the android phone, I think it is rather straightforward to use Spongycastle instead. It is an android port of Bouncycastle.

相关文章