2 # $Id: setpassphrase.tcl 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $
3 # ========================================================================
4 # Copyright 2008 University of Washington
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # ========================================================================
16 # Purpose: CGI script to accept user passphrase
29 # inherit global config
32 # Import data validate it and get session id
33 if {[catch {WPGetInputAndID sessid
}]} {
38 foreach item
$auth_vars {
39 if {[catch {eval WPImport
$item} errstr
]} {
40 WPInfoPage
"Web Alpine Error" [font size
=+2 $errstr] "Please close this window."
45 cgi_puts
"Content-type: text/html; charset=\"UTF-8\"\n"
46 set answer
"Problem setting passphrase"
48 if {[string compare
$auths "Smime"] != 0
49 ||
[string length
$pass] == 0
50 ||
[catch {WPCmd PESession setpassphrase
$pass} answer
]} {
51 cgi_puts
"Cannot accept passphrase: $answer"