public static ExtendedKeyUsage getExtendedKeyUsage ( Set < String > usages ) { KeyPurposeId [ ] keyUsages = new KeyPurposeId [ usages . size ( ) ] ; int i = 0 ; for ( String usage : usages ) { keyUsages [ i ++ ] = KeyPurposeId . getInstance ( new ASN1ObjectIdentifier ( usage ) ) ; } return new ExtendedKeyUsage ( keyUsages ) ; }
Convert a set of extended key usages to Bouncy Castle extended key usage .