code: public Set<String> getCriticalExtensionOIDs() {
          if (extensions == null) {
              return null;
          }
          Set<String> extSet = new TreeSet<>();
          for (Extension ex : extensions.getAllExtensions()) {
              if (ex.isCritical()) {
                  extSet.add(ex.getExtensionId().toString());
              }
          }
          return extSet;
      }
docs: Gets a Set of the extension(s) marked CRITICAL in this
  X509CRLEntry.  In the returned set, each extension is
  represented by its OID string.
  
  @return a set of the extension oid strings in the
  Object that are marked critical.