I have two XML files, structured as follows:
My Key
...
..
For those who want the resulting PEM to be readable by BouncyCastle:
The final solution I am happy with:
java XMLSec2PEM my.xml > my.pemmy.pem manually a bitorg.bouncycastle.openssl.PEMReader.readObject() returns null :-(openssl pkcs8 -topk8 -inform pem -in my.pem -outform pem -nocrypt -out my.pkcs8openssl pkcs8 -inform pem -nocrypt -in my.pkcs8 -out my.pkcs8.pemmy.pkcs8.pem is readable with the PEMReader