code: 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);
      }
docs: Convert a set of extended key usages to Bouncy Castle extended key usage.
  
  @param usages the set of authorized usages.
  @return a bit mask