Java 类sun.security.x509.SubjectKeyIdentifierExtension 实例源码

项目:openjdk-jdk10    文件:CertificateBuilder.java   
/**
 * 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));
}
项目:openjdk9    文件:CertificateBuilder.java   
/**
 * 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));
}