code: private void encodeThis() throws IOException {
          DerOutputStream out = new DerOutputStream();
          DerOutputStream tmp = new DerOutputStream();
  
          if (ca) {
              tmp.putBoolean(ca);
              // Only encode pathLen when ca == true
              if (pathLen >= 0) {
                  tmp.putInteger(pathLen);
              }
          }
          out.write(DerValue.tag_Sequence, tmp);
          this.extensionValue = out.toByteArray();
      }
docs: Encode this extension value