Check-in [4e2d137c66]
Not logged in
Overview
Comment:Fixes to the whitespace changes to account for the response handling used by 'getLookupData'.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | unsigned
Files: files | file ages | folders
SHA1: 4e2d137c66f1b39dc91843fa51c072da64815f78
User & Date: mistachkin on 2016-09-28 18:40:08
Other Links: branch diff | manifest | tags
Context
2016-09-28
18:42
Make the semantics used by the 'isPgpSignature' and 'isHarpyCertificate' procedures stricter. check-in: 2ab0ea3cbd user: mistachkin tags: trunk
18:40
Fixes to the whitespace changes to account for the response handling used by 'getLookupData'. Closed-Leaf check-in: 4e2d137c66 user: mistachkin tags: unsigned
08:23
Make the semantics used by the 'isHarpyCertificate' procedure stricter. check-in: e61c339033 user: mistachkin tags: unsigned
Changes

Modified client/1.0/pkgr.eagle from [d008c3bcc3] to [d8bb8d2052].

171
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
200
201
202
203



204
205
206
207
208

209
210
211
212
213
214
215



216
217
218
219
220
221
222
171
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
200
201



202
203
204


205
206
207
208
209
210
211
212



213
214
215
216
217
218
219
220
221
222







-
-
-
+
+
+



+

















-
-
-
+
+
+
-
-



+




-
-
-
+
+
+







        return false
      }
    }
  }

  #
  # 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>".
  #       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 value [string trim $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
    }
  }

  #
  # NOTE: This procedure returns non-zero if the specified string value
  #       looks like an OpenPGP signature.  The value argument is the
  #       string to check.  The value 29 used within this procedure is
  #       the length of the literal string "-----END PGP SIGNATURE-----"
  #       looks like an OpenPGP signature.  The value argument is the string
  #       to check.  The value 27 used within this procedure is the length
  #       of the literal string "-----END PGP SIGNATURE-----".
  #       followed by a carriage-return / line-feed pair, which means
  #       the value must be in DOS format.
  #
  # <public>
  proc isPgpSignature { value } {
    set value [string trim $value]
    set length [string length $value]

    if {$length == 0 || ([string first [string trim {
      -----BEGIN PGP SIGNATURE-----
    }] $value] == 0 && [string first [subst [string trim {
      -----END PGP SIGNATURE-----\r\n
    }]] $value] == ($length - 29))} then {
    }] $value] == 0 && [string first [string trim {
      -----END PGP SIGNATURE-----
    }] $value] == ($length - 27))} then {
      return true
    } else {
      return false
    }
  }

  #