code: public static javax.security.cert.X509Certificate convert(java.security.cert.X509Certificate cert) {
          try {
              byte[] encoded = cert.getEncoded();
              return javax.security.cert.X509Certificate.getInstance(encoded);
          } catch (java.security.cert.CertificateEncodingException e) {
          } catch (javax.security.cert.CertificateEncodingException e) {
          } catch (javax.security.cert.CertificateException e) {
          }
          return null;
      }
docs: Converts to javax.security