code: @Deprecated
      public X509Certificate loadDERCertificate(InputStream certificateInputStream) throws IOException, CertificateException {
          try {
              return CertUtils.toX509Certificate(certificateInputStream);
          } catch (IllegalStateException ex) {
              throw new IOException("Certificate from the input stream could not be decrypted", ex);
          }
      }
docs: Load a DER Certificate from an <code>InputStream</code>.
  
  The caller is responsible for closing the stream after this method returns successfully or fails.
  
  @param certificateInputStream
  <code>InputStream</code> containing the certificate.
  @return Loaded certificate.
  @throws IOException
  @throws CertificateException
  @deprecated