cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_Lloyd
F5 Employee
F5 Employee

Problem this snippet solves:

iControl SOAP C# code sample: Modifying a default Cert/Key/Chain object in an SSL Client profile using LocalLBProfileClientSSL.set_certificate_key_chain_members().

How to use this snippet:

Uses the Windows IControl Library for Microsoft.Net

Code :

public void test_set_certificate_key_chain_members()
        {

            //Working on the default profile we created
            string[] profile_name = new string[] { "test_client_ssl_profile" };

            //Now we are using the default crt/key object from the profile we create
            string[][] obj_name = new string[1][];
            obj_name[0] = new string[] { "default" };

            //Create the key chain object. 
            LocalLBProfileClientSSLCertificateKeyChain[][] newchain = new LocalLBProfileClientSSLCertificateKeyChain[1][];
            newchain[0] = new LocalLBProfileClientSSLCertificateKeyChain[1];
            newchain[0][0] = new LocalLBProfileClientSSLCertificateKeyChain();
            newchain[0][0].certificate = "/Common/www.cabal.org.crt";
            newchain[0][0].key = "/Common/www.cabal.org.key";
            newchain[0][0].chain = "/Common/www.cabal.org.crt";
            newchain[0][0].passphrase = "";

            //Now change the default key chain object.
            m_interfaces.LocalLBProfileClientSSL.set_certificate_key_chain_members(profile_name, obj_name, newchain);

        }

Tested this on version:

12.1
Version history
Last update:
‎15-Jun-2018 13:19
Updated by:
Contributors