home *** CD-ROM | disk | FTP | other *** search
- namespace eval ::apache1.3:: {}
-
- proc ::apache1.3::parseSSLPassPhraseDialog {text parser dirDef xmlConf currentContainer} {
- set elements [apacheparserutils::getElements $text ]
-
- # Take into account the exec: stuff and file can contain spaces
-
- set xuiObj [apacheparserutils::getOrCreateIfNotExists SSLPassPhraseDialog \
- $dirDef $xmlConf $currentContainer]
- switch [string tolower [lindex $elements 1]] {
- builtin {
- $xuiObj selectComponentByName builtin
- }
- default {
- regexp {:(.*)$} $text match file
- $xuiObj selectComponentByName exec
-
- # loadValue takes care of spaces and quotes
-
- ::apacheparserutils::loadValue [$xuiObj getComponentByName exec] $file
- }
- }
-
- }
-
- proc ::apache1.3::dumpSSLPassPhraseDialog { xuiObj } {
- set result {SSLPassPhraseDialog }
- switch [$xuiObj getSelectedComponentName] {
- builtin {
- append result builtin
- return $result\n
- } exec {
- set value [[$xuiObj getComponentByName exec] getValue]
- if [regexp {\ } $value] {
- set value "\"$value\""
- }
- append result exec:
- append result $value
- return $result\n
- }
- }
- }
-
- proc ::apache1.3::parseSSLMutex {text parser dirDef xmlConf currentContainer} {
- set elements [apacheparserutils::getElements $text ]
-
- # Take into account the exec: stuff and file can contain spaces
-
- set xuiObj [apacheparserutils::getOrCreateIfNotExists SSLMutex \
- $dirDef $xmlConf $currentContainer]
- switch [string tolower [lindex $elements 1]] {
- none {
- $xuiObj selectComponentByName none
- } sem {
- $xuiObj selectComponentByName sem
- } default {
- regexp {:(.*)$} $text match file
- $xuiObj selectComponentByName file
-
- # loadValue takes care of spaces and quotes
-
- ::apacheparserutils::loadValue [$xuiObj getComponentByName file] $file
- }
- }
-
- }
-
- proc ::apache1.3::dumpSSLMutex { xuiObj } {
- set result {SSLMutex }
- switch [$xuiObj getSelectedComponentName] {
- none {
- append result none
- return $result\n
- } sem {
- append result sem
- return $result\n
- } file {
- set value [[$xuiObj getComponentByName file] getValue]
- if [regexp {\ } $value] {
- set value "\"$value\""
- }
- append result exec:
- append result $value
- return $result\n
- }
- }
- }
-
- proc ::apache1.3::parseSSLRandomSeed {text parser dirDef xmlConf currentContainer} {
- set elements [apacheparserutils::getElements $text ]
-
- # Take into account the exec: stuff and file can contain spaces
-
- set xuiObj [apacheparserutils::getOrCreateIfNotExists SSLRandomSeed \
- $dirDef $xmlConf $currentContainer]
- set child [$xuiObj newChild]
- $xuiObj insertChild $child
- ::apacheparserutils::loadValue [$child getComponentByName context] \
- [lindex $elements 1]
- set source [$child getComponentByName source]
- switch -glob [string tolower [lindex $elements 2]] {
- builtin {
- $source selectComponentByName builtin
- } file:* {
- $source selectComponentByName file
- regexp {:(.*)$} $text match file
- set newElements [apacheparserutils::getElements $file]
- set file [lindex $newElements 0]
- set bytes [lindex $newElements 1]
-
- # loadValue takes care of spaces and quotes
-
- ::apacheparserutils::loadValue [[$source getComponentByName file] \
- getComponentByName file] $file
- ::apacheparserutils::loadValue [[$source getComponentByName file] \
- getComponentByName bytes] $bytes
- } exec:* {
- $source selectComponentByName exec
- regexp {:(.*)$} $text match program
- set newElements [apacheparserutils::getElements $program]
- set program [lindex $newElements 0]
- set bytes [lindex $newElements 1]
-
- # loadValue takes care of spaces and quotes
-
- ::apacheparserutils::loadValue [[$source getComponentByName exec] \
- getComponentByName program] $program
- ::apacheparserutils::loadValue [[$source getComponentByName exec] \
- getComponentByName bytes] $bytes
- } default {
- error "Should never happen in SSLRandomSeed"
- }
- }
- }
-
- proc ::apache1.3::dumpSSLRandomSeed { xuiObj } {
- set result {}
- foreach child [$xuiObj getChildren] {
- append result {SSLRandomSeed }
- append result [[$child getComponentByName context] getSelected]
- append resul { }
- set source [$child getComponentByName source]
- set component [$source getSelectedComponent]
- switch [$component getName] {
- builtin {
- append result builtin
- } file {
- set value [[$component getComponentByName file] getValue]
- if [regexp {\ } $value] {
- set value "\"$value\""
- }
- append result $value
- append result { }
- set bytes [[$component getComponentByName bytes] getValue]
- append result $bytes
- append result \n
- } exec {
- set value [[$component getComponentByName program] getValue]
- if [regexp {\ } $value] {
- set value "\"$value\""
- }
- append result $value
- append result { }
- set bytes [[$component getComponentByName bytes] getValue]
- append result $bytes
- append result \n
-
- } default {
- error "Should never happen. No selected SSLRandomSeed"
- }
- }
- }
- return $result
- }
-
-
- proc ::apache1.3::parseSSLSessionCache {text parser dirDef xmlConf currentContainer} {
- set elements [apacheparserutils::getElements $text ]
-
- # Take into account the exec: stuff and file can contain spaces
-
- set xuiObj [apacheparserutils::getOrCreateIfNotExists SSLSessionCache \
- $dirDef $xmlConf $currentContainer]
- switch [string tolower [lindex $elements 1]] {
- none {
- $xuiObj selectComponentByName none
- }
- default {
- regexp {:(.*)$} $text match file
- $xuiObj selectComponentByName dbm
-
- # loadValue takes care of spaces and quotes
-
- ::apacheparserutils::loadValue [$xuiObj getComponentByName dbm] $file
- }
- }
-
- }
-
- proc ::apache1.3::dumpSSLSessionCache { xuiObj } {
- set result {SSLSessionCache }
- switch [$xuiObj getSelectedComponentName] {
- none {
- append result none
- return $result\n
- } dbm {
- set value [[$xuiObj getComponentByName dbm] getValue]
- if [regexp {\ } $value] {
- set value "\"$value\""
- }
- append result dbm:
- append result $value
- return $result\n
- }
- }
- }
-
-
- proc ::apache1.3::parseSSLProtocol \
- {text parser dirDef xmlConf currentContainer} {
- set elements [::apacheparserutils::getElements $text]
- set xuiObj [apacheparserutils::getOrCreateIfNotExists options \
- $dirDef $xmlConf $currentContainer]
- foreach element [lrange $elements 1 end] {
- set child [$xuiObj newChild]
- $xuiObj insertChild $child
- switch -- [string index $element 0] {
- + {
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName protocol] selectItem \
- [string tolower [string range $element 1 end]]
- } - {
- [$child getComponentByName action] selectItem disable
- [$child getComponentByName protocol] selectItem \
- [string tolower [string range $element 1 end]]
- } default {
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName protocol] selectItem \
- [string tolower $element]
- }
- }
- }
- }
-
-
-
-
- proc ::apache1.3::dumpSSLProtocol {xuiObj} {
- if ![llength [set children [$xuiObj getChildren]]] {
- return
- }
- set result {SSLProtocol }
- foreach child $children {
- append result { }
- switch [[$child getComponentByName action] getSelected] {
- enable {
- append result +
- } disable {
- append result -
- }
- }
- append result [[$child getComponentByName protocol] getSelected]
- }
- return $result\n
- }
-
-
- proc ::apache1.3::parseSSLOptions \
- {text parser dirDef xmlConf currentContainer} {
- set elements [::apacheparserutils::getElements $text]
- set xuiObj [apacheparserutils::getOrCreateIfNotExists SSLOptions \
- $dirDef $xmlConf $currentContainer]
- set list [$xuiObj getComponentByName rules]
- [$xuiObj getComponentByName merge] setValue
- foreach element [lrange $elements 1 end] {
- set child [$list newChild]
- $list insertChild $child
- switch -- [string index $element 0] {
- + {
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName option] selectItem \
- [string tolower [string range $element 1 end]]
- } - {
- [$child getComponentByName action] selectItem disable
- [$child getComponentByName option] selectItem \
- [string tolower [string range $element 1 end]]
- } default {
- [$xuiObj getComponentByName merge] clearValue
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName option] selectItem \
- [string tolower $element]
- }
- }
- }
- }
-
-
-
- proc ::apache1.3::dumpSSLOptions {xuiObj} {
- set mergeFlag [[$xuiObj getComponentByName merge] getValue]
- set list [$xuiObj getComponentByName rules]
- if ![llength [set children [$list getChildren]]] {
- return
- }
- set result {SSLOptions }
- foreach child $children {
- append result { }
- switch [[$child getComponentByName action] getSelected] {
- enable {
- if $mergeFlag {
- append result +
- }
- } disable {
- if $mergeFlag {
- append result -
- } else {
-
- # If we are not merging, we do not need - (unsure)
-
- break
- }
- }
- }
- append result [[$child getComponentByName option] getSelected]
- }
- return $result\n
- }
-
-
- set old {
-
- proc ::apache1.3::parseSSLOptions \
- {text parser dirDef xmlConf currentContainer} {
- set elements [::apacheparserutils::getElements $text]
- set xuiObj [apacheparserutils::getOrCreateIfNotExists options \
- $dirDef $xmlConf $currentContainer]
- foreach element [lrange $elements 1 end] {
- set child [$xuiObj newChild]
- $xuiObj insertChild $child
- switch -- [string index $element 0] {
- + {
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName protocol]
- selectItem \
- [string tolower [string range $element 1 end]]
- } - {
- [$child getComponentByName action] selectItem disable
- [$child getComponentByName protocol] selectItem \
- [string tolower [string range $element 1 end]]
- } default {
- [$child getComponentByName action] selectItem enable
- [$child getComponentByName protocol] selectItem \
- [string tolower $element]
- }
- }
- }
- }
-
-
-
- proc ::apache1.3::dumpSSLOptions {xuiObj} {
- if ![llength [set children [$xuiObj getChildren]]] {
- return
- }
- set result {SSLOptions }
- foreach child $children {
- append result { }
- switch [[$child getComponentByName action] getSelected] {
- enable {
- append result +
- } disable {
- append result -
- }
- }
- append result [[$child getComponentByName protocol] getSelected]
- }
- }
-
- }
-