95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
#
# 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 } {
if {[string length $value] == 0 || [string first [string trim {
<Certificate xmlns="https://eagle.to/2011/harpy"
}] $value] != -1} then {
return true
} else {
return false
}
}
#
# NOTE: This procedure returns non-zero if the specified string value
# looks like a PGP signature. The value argument is the string
# to check.
#
# <public>
proc isPgpSignature { value } {
if {[string length $value] == 0 || [string first [string trim {
-----BEGIN PGP SIGNATURE-----
}] $value] != -1} then {
return true
} else {
return false
}
}
#
|
|
>
>
|
|
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
#
# 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 } {
if {[string length $value] == 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
}
}
#
# NOTE: This procedure returns non-zero if the specified string value
# looks like a PGP signature. The value argument is the string
# to check.
#
# <public>
proc isPgpSignature { value } {
if {[string length $value] == 0 || [string first [string trim {
-----BEGIN PGP SIGNATURE-----
}] $value] == 0} then {
return true
} else {
return false
}
}
#
|