code: public static byte[] getEncodedInternal(X509CRL crl) throws CRLException {
          if (crl instanceof X509CRLImpl) {
              return ((X509CRLImpl)crl).getEncodedInternal();
          } else {
              return crl.getEncoded();
          }
      }
docs: Returned the encoding of the given certificate for internal use.
  Callers must guarantee that they neither modify it nor expose it
  to untrusted code. Uses getEncodedInternal() if the certificate
  is instance of X509CertImpl, getEncoded() otherwise.