code: public byte[] createCertificateRequest(X509Certificate cert, KeyPair keyPair) throws GeneralSecurityException {
  
          String issuer = cert.getSubjectDN().getName();
          X509Name subjectDN = new X509Name(issuer + ",CN=proxy");
          String sigAlgName = cert.getSigAlgName();
          return createCertificateRequest(subjectDN, sigAlgName, keyPair);
      }
docs: Creates a certificate request from the specified certificate and a key pair. The certificate's subject
  DN with <I>"CN=proxy"</I> name component appended to the subject is used as the subject of the
  certificate request. Also the certificate's signing algorithm is used as the certificate request
  signing algorithm.
  
  @param cert
  the certificate to create the certificate request from.
  @param keyPair
  the key pair of the certificate request
  @return the certificate request.
  @exception GeneralSecurityException
  if security error occurs.