Forum Discussion
andy_12_5042
Dec 29, 2010Nimbostratus
set ssl options in a client ssl profile
I have been trying to get this right but am missing something. The function will set the options check box but does not set the value? I had simialr issue with another function so I know it is because...
L4L7_53191
Dec 30, 2010Nimbostratus
Andy: I think you want to create the profile SSL option, then stuff it into a list object to create your 'sequence':
In [18]: opts = ssl.typefactory.create('LocalLB.ProfileSSLOption')
In [19]: opts
Out[19]:
(LocalLB.ProfileSSLOption){
values =
(LocalLB.SSLOptionSequence){
_arrayType = ""
_offset = ""
_id = ""
_href = ""
_arrayType = ""
}
default_flag = None
}
So something like this will work:
opts = ssl.typefactory.create('LocalLB.ProfileSSLOption')
option_list = ssl.typefactory.create('LocalLB.SSLOption') This step is optional, but I wanted to show you that there's a type for the SSL option objects. It's simply an enum.
opts.values = [option_list.SSL_OPTION_EPHEMERAL_RSA] Note that I wrap this up in a list, as specified in the SDK (had to look this up)
ssl.set_ssl_option(['via-pycontrol'], options = [opts])
Now, confirm it all:
ssl.get_ssl_option(['via-pycontrol'])
Out[39]:
[(LocalLB.ProfileSSLOption){
values[] =
"SSL_OPTION_EPHEMERAL_RSA",
default_flag = False
}]
Voila!
HTH,
-Matt
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