172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
}
}
}
#
# NOTE: This procedure returns non-zero if the specified string value
# looks like a Harpy (script) certificate. The value argument
# is the string to check.
#
# <public>
proc isHarpyCertificate { value } {
set length [string length $value]
if {$length == 0 || ([string first [string trim {
<?xml version="1.0" encoding="utf-8"?>
}] $value] == 0 && [string first [string trim {
<Certificate xmlns="https://eagle.to/2011/harpy"
}] $value] != -1)} then {
return true
} else {
return false
}
}
#
|
|
>
|
>
>
|
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
}
}
}
#
# NOTE: This procedure returns non-zero if the specified string value
# looks like a Harpy (script) certificate. The value argument
# is the string to check. The value 14 used within this procedure
# is the length of the literal string "</Certificate>".
#
# <public>
proc isHarpyCertificate { value } {
set length [string length $value]
if {$length == 0 || ([string first [string trim {
<?xml version="1.0" encoding="utf-8"?>
}] $value] == 0 && [string first [string trim {
<Certificate xmlns="https://eagle.to/2011/harpy"
}] $value] != -1 && [string first [string trim {
</Certificate>
}] $value] == ($length - 14))} then {
return true
} else {
return false
}
}
#
|