cedadev / online_ca_client

1 stars 1 forks source link

reorder items in credentials file #10

Open mjpritchard opened 2 years ago

mjpritchard commented 2 years ago

For full compatibility with known applications, the desired order of items in the issued credentials file is as follows, to match a credential issued by myproxy. Currently, the private key comes at the end.

-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
philipkershaw commented 2 years ago

Hi @mjpritchard, I'm about to apply a patch for the Python client for this API. This ensures that the cert and key ordering is correct before serialisation to file. With the shell script it simply outputs what it gets back from the server. It's hard to sanitise the ordering of output with bash :) so really the solution lies on the server-side and ensuring this code is correctly ordering the outputs before sending over the wire. Need to check with @watucker about the server code base