diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-07-06 21:20:23 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-07-06 21:20:23 +0000 |
commit | cc003e2d5ff152ff10130c747c06e59a1690fb98 (patch) | |
tree | 2ca4654267843afe3ac114a7b1ac0ce3fc85f062 | |
parent | 99b2afde5a20a270395e9bf53a302aa9b804dd8a (diff) | |
download | pki-cc003e2d5ff152ff10130c747c06e59a1690fb98.tar.gz pki-cc003e2d5ff152ff10130c747c06e59a1690fb98.tar.xz pki-cc003e2d5ff152ff10130c747c06e59a1690fb98.zip |
Fixed bugzilla bug #492952.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@678 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r-- | pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template b/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template index 24875df31..fea402c31 100644 --- a/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template +++ b/pki/dogtag/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template @@ -196,7 +196,7 @@ function setCRMFRequest() } else { document.writeln("<OBJECT classid='clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1' CODEBASE='/xenroll.dll' id='Enroll'></OBJECT>"); } - document.writeln('<form name="ReqForm" method="post" action="' + uri + '">'); + document.writeln('<form name="ReqForm" onSubmit="if (checkRequest()) {return true;} else {window.location.reload(); return false;}" method="post" action="' + uri + '">'); } else if (typeof(crypto.version) != "undefined") { document.writeln('<form name="ReqForm" onSubmit="return validate();" method="post" action="' + uri + '">'); } else { @@ -231,7 +231,7 @@ Function GetOSVersion GetOSVersion = 5 End Function -Sub Send_OnClick +Function checkRequest Dim TheForm Dim szName Dim options @@ -241,6 +241,8 @@ Sub Send_OnClick Dim keyIndex Set TheForm = Document.ReqForm + checkRequest = False + keyIndex = TheForm.all.keyLength.options.selectedIndex keyLen = CInt (TheForm.all.keyLength.options(keyIndex).value) @@ -276,7 +278,7 @@ Sub Send_OnClick ' they were doing ... need to think what should be done here ' If (szCertReq = Empty AND theError = 0) Then - Exit Sub + Exit Function End If If (szCertReq = Empty OR theError <> 0) Then @@ -287,7 +289,7 @@ Sub Send_OnClick ' sz = "The error '" & Hex(theError) & "' occurred." & chr(13) & chr(10) & "Your credentials could not be generated." result = MsgBox(sz, 0, "Credentials Enrollment") - Exit Sub + Exit Function End If TheForm.cert_request.Value = szCertReq @@ -308,28 +310,28 @@ Sub Send_OnClick If IsObject(g_objClassFactory) = False Then result = MsgBox("Can't create Factory Object " & " Error: " & Err.number & " :" & Err.description,0,"") - Exit Sub + Exit Function End If Set enrollment = g_objClassFactory.CreateObject("X509Enrollment.CX509Enrollment") If IsObject(enrollment) = False Then result = MsgBox("Can't create enroll Object! " & " Error: " & Err.number & " :" & Err.description,"") - Exit Sub + Exit Function End If Set privateKey = g_objClassFactory.CreateObject("X509Enrollment.CX509PrivateKey") If IsObject(privateKey) = False Then result = MsgBox("Can't create Key Object! " & " Error: " & Err.number & " :" & Err.description,0,"") - Exit Sub + Exit Function End If Set request = g_objClassFactory.CreateObject("X509Enrollment.CX509CertificateRequestPkcs10") If IsObject(request) = False Then result = MsgBox("Can't create Request Object. ! " & " Error: " & Err.number & " :" & Err.description,0,"") - Exit Sub + Exit Function End If privateKey.KeySpec= "1" @@ -347,7 +349,7 @@ Sub Send_OnClick If IsObject(objDN) = False Then result = MsgBox("Can't create DN Object. ! " & " Error: " & Err.number & " :" & Err.description,0,"") - Exit Sub + Exit Function End If objDN.Encode szName,0 @@ -360,14 +362,14 @@ Sub Send_OnClick If len(csr) = 0 Then result = MsgBox("Error Creating Request! "& " Error: " & Err.number & " :" & Err.description,0,"") - Exit Sub + Exit Function End If TheForm.cert_request.Value = csr End If - Exit Sub -End Sub + checkRequest = True +End Function --> </SCRIPT> @@ -528,7 +530,7 @@ document.writeln('<input type=hidden name=xmlOutput value="' + if (errorCode == 0) { if (navigator.appName == "Microsoft Internet Explorer") { if (typeof(keygen_request) != "undefined") { - document.writeln('<input type=submit Name="Send" value="Submit">'); + document.writeln('<input type=submit value="Submit">'); } else { document.writeln('<input type=submit value="Submit">'); } |