CSR creation in android
Assuming you posted correctly, your second file has the base64 body of the claimed PEM format as a single line, not broken/folded into lines of 64 chars (max) as required. See RFC 7468 section 2 near the end. Some software is lax about this (including, usefully, openssl asn1parse !) but not all. I wonder if you got these switched, because OpenSSL commandline (and library) always writes PEM with linebreaks as required -- although IME it may write Unix-style linebreaks (LF only) on Windows, and if you open such a file in some Windows programs like notepad it may ignore/discard the LF and treat it as one huge line while e.g. wordpad (or type or more) displays it correctly.