code: public X509Credential createCredential(X509Certificate[] certs, PrivateKey privateKey, int bits, int lifetime,
         GSIConstants.DelegationType delegType, X509ExtensionSet extSet, String cnValue) throws GeneralSecurityException {
  
          X509Certificate[] bcCerts = getX509CertificateObjectChain(certs);
  
          return createCredential(bcCerts, privateKey, bits, lifetime, decideProxyType(bcCerts[0], delegType), extSet, cnValue);
      }
docs: Creates a new proxy credential from the specified certificate chain and a private key,
  using the given delegation mode.
  @see #createCredential(X509Certificate[], PrivateKey, int, int, GSIConstants.CertificateType, X509ExtensionSet, String)