/** * Add the Subject Key Identifier extension. * * @param subjectKey The public key to be used in the resulting certificate * * @throws IOException if an encoding error occurs. */ public void addSubjectKeyIdExt(PublicKey subjectKey) throws IOException { byte[] keyIdBytes = new KeyIdentifier(subjectKey).getIdentifier(); addExtension(new SubjectKeyIdentifierExtension(keyIdBytes)); }