subject-alternative-name

Can somebody help me to implement extension Subject Alternative Names using BouncyCastle?

大兔子大兔子 提交于 2021-01-27 22:59:01
问题 I have some string, that is separated with comma. I have to add all extension that match any of GeneralName for Subject Alternative Names extension. Can somebody finish for loop for me? @Override public boolean saveKeypair(String arg0) { KeyPair keyPair = generateKeyPair(Integer.parseInt(access.getPublicKeyParameter())); PrivateKey privateKey = keyPair.getPrivate(); PublicKey publicKey = keyPair.getPublic(); X500Name name = new X500Name(access.getSubject()); BigInteger serial = new BigInteger

Getting Subject Alternate Names with Pkcs10CertificationRequest

懵懂的女人 提交于 2019-12-01 04:01:53
问题 I'm currently able to decode a CSR's values except for Requested Extensions, specifically X509v3 Subject Alternative Name . Here's the relevant part of my `DecodeCSR(string csr): public void DecodeCsr(string csrStr){ //getting just csr var csrChars = Regex.Replace(csrStr, @"-----[^-]+-----", "").Trim().Replace(" ", "").Replace(Environment.NewLine, "").ToCharArray(); //converting that string into a byte array byte[] csrEncode = Convert.FromBase64CharArray(csrChars, 0, csrChars.Length); /