Forum Discussion
tb_90575
Nimbostratus
Jul 19, 2010Error exporting CSR with iControl
I'm trying to automate the process of creating vip/pool/ssl sets for our QA-Test systems, which are built dynamically using VMs and iControl. I have all the entity creation stuff working, but getting stuck on SSL Cert/Key creation. I successfully create a key, I successfully generate a CSR. I need to sign the CSR with an external CA (Self-hosted) so I need to get the file. Right now I am trying to do this using the certificate_request_export_to_file() feature of iControl, invoked via the .NET library. So I do
result = this.ManagementKeyCertificate.Begincertificate_request_export_to_file(ManagementKeyCertificateManagementModeType.MANAGEMENT_MODE_DEFAULT, new string[] { req.id }, new string[] { @"/path/where/I/want" }, true, null, null);this.ManagementKeyCertificate.Endcertificate_request_export_to_file(result);And I get a nasty error, almost like the CGI portal for icontrol bombed on me: "Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'.\r\nThe request failed with the error message:\r\n--\r\n \r\n--." I am catching the traffic coming over the wire, but the SOAP response is blank. just text/xml, headers no body. HTTP Code: 500. Everything else works, but I continually hit this. What am I missing?2 Replies
- samstep
Cirrocumulus
Difficult to say what went wrong without debugging your SOAP request.
I would suggest to try ManagementKeyCertificate.certificate_request_export_to_pem(...) method - it should return the CSR as a string array which you can simply save in the local .csr file using .NET
http://devcentral.f5.com/wiki/default.aspx/iControl/Management__KeyCertificate__certificate_request_export_to_pem.html
Sam - tb_90575
Nimbostratus
I don't know how I missed the PEM option, but thank you so much. It works and its much more what I needed it to do in t he first place
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
