Export certificate in binary using keytool, if the certificate is in the key store
keytool -storepass my-keystore-password -alias myalias -export -file outfilename.cer