code: public static ExtendedKeyUsages getExtendedKeyUsages(ExtendedKeyUsage usages)
      {
          if (usages == null) {
              return null;
          }
  
          List<String> usageStr = new ArrayList<String>();
  
          for (KeyPurposeId keyPurposeId : usages.getUsages()) {
              usageStr.add(keyPurposeId.getId());
          }
  
          return new ExtendedKeyUsages(usageStr);
      }
docs: Convert extended usages from Bouncy Castle.
  
  @param usages the bouncy castle extended key usage to convert.
  @return the set of authorized usages.