iControl SOAP SSL client profile creation code sample
Problem this snippet solves:
iControl SOAP C# code sample: SSL client profile creation using LocalLBProfileClientSSL.create_v2 and LocalLBProfileClientSSL.set_default_profile.
How to use this snippet:
Uses the Windows IControl Library for Microsoft.Net
Code :
public void test_ssl_client_profile_create_V2()
{
//Create a client SSL profile using create_v2, then add default profile with clientssl-secure
//create profile name;
string[] profile_name = new string[] { "test_client_ssl_profile" };
//Must have a default cert/key pair
LocalLBProfileString[] ssl_key = new LocalLBProfileString[1];
LocalLBProfileString[] ssl_cert = new LocalLBProfileString[1];
//start with defaults. This will be changed later
ssl_key[0] = new LocalLBProfileString();
ssl_key[0].value = "/Common/default.key";
ssl_key[0].default_flag = false;
ssl_cert[0] = new LocalLBProfileString();
ssl_cert[0].value = "/Common/default.crt";
ssl_cert[0].default_flag = false;
//Now create the profile
m_interfaces.LocalLBProfileClientSSL.create_v2(profile_name, ssl_key, ssl_cert);
//in this case adding clientssl-secure as default profile
string[] default_profile = new string[] { "clientssl-secure" };
//Now call set_default_profile
m_interfaces.LocalLBProfileClientSSL.set_default_profile(profile_name, default_profile);
}Tested this on version:
12.1Published Jun 15, 2018
Version 1.0Mark_Lloyd
Employee
I have been Enterprise Network Engineer for almost ten years since I joined F5 supporting the many aspects of the Bigip platform for our enterprise customers.Mark_Lloyd
Employee
I have been Enterprise Network Engineer for almost ten years since I joined F5 supporting the many aspects of the Bigip platform for our enterprise customers.No CommentsBe the first to comment