本文整理汇总了Java中sun.security.x509.KeyUsageExtension类的典型用法代码示例。如果您正苦于以下问题:Java KeyUsageExtension类的具体用法?Java KeyUsageExtension怎么用?Java KeyUsageExtension使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KeyUsageExtension类属于sun.security.x509包,在下文中一共展示了KeyUsageExtension类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addKeyUsageExt
import sun.security.x509.KeyUsageExtension; //导入依赖的package包/类
/**
* Set a Key Usage extension for the certificate. The extension will
* be marked critical.
*
* @param bitSettings Boolean array for all nine bit settings in the order
* documented in RFC 5280 section 4.2.1.3.
*
* @throws IOException if an encoding error occurs.
*/
public void addKeyUsageExt(boolean[] bitSettings) throws IOException {
addExtension(new KeyUsageExtension(bitSettings));
}