How to convert a Java keystore (JKS) to PEM format

$certStore=dirname(__FILE__)."/cert/cert.pem";
            $caStore=dirname(__FILE__)."/cert/ca.pem";
            $keyStore=dirname(__FILE__)."/cert/key.pem";
            
        $keyPass=$this->session->data['key'];
            $keyStoreType= "PEM";
            $ch= curl_init();
            curl_setopt($ch, CURLOPT_URL, $gateway_url);
            curl_setopt($ch, CURLOPT_VERBOSE, true);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true);
            curl_setopt($ch, CURLOPT_PORT, 443);
            curl_setopt($ch, CURLOPT_CAINFO,$caStore);
            curl_setopt($ch, CURLOPT_SSLCERT,$certStore);
            curl_setopt($ch, CURLOPT_SSLKEY,$keyStore);
            curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $keyPass);
            curl_setopt($ch, CURLOPT_SSLKEYTYPE,$keyStoreType);        
            $headers = array();
       array_push($headers, "Content-Type: text/xml; charset=utf-8");
       array_push($headers, "SOAPAction: sii:RB_OLP_INITIATE_PAYMENT");
       array_push($headers, "Host:b2brbtest.riyadbank.com");
            if($request_string != null) {
       curl_setopt($ch, CURLOPT_POSTFIELDS, $request_string);
       array_push($headers, "Content-Length: " . strlen($request_string));
     }
            curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
            
       curl_setopt($ch, CURLOPT_POST, true);
Hamdan ShafiqFull Stack PHP DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
What does that have to do with Java? - it looks distinctly like php to me ...
Hamdan ShafiqFull Stack PHP DeveloperAuthor Commented:
i need for  curl code
CEHJCommented:
Sorry - i don't understand how that answers my question, and how it relates to the title of your question
Hamdan ShafiqFull Stack PHP DeveloperAuthor Commented:
how can create  keystore (JKS) to PEM?
CEHJCommented:
Probably can be done with openssl if you look into it. I could do it for you but it would have to be on Live

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.