summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
Diffstat (limited to 'pki')
-rw-r--r--pki/linux/ca-ui/pki-ca-ui.spec4
-rw-r--r--pki/linux/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template16
-rw-r--r--pki/linux/ra-ui/pki-ra-ui.spec4
-rw-r--r--pki/linux/ra-ui/shared/docroot/ee/user/user.vm228
4 files changed, 207 insertions, 45 deletions
diff --git a/pki/linux/ca-ui/pki-ca-ui.spec b/pki/linux/ca-ui/pki-ca-ui.spec
index 8c7a9206a..fef6711f0 100644
--- a/pki/linux/ca-ui/pki-ca-ui.spec
+++ b/pki/linux/ca-ui/pki-ca-ui.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_prefix}-%{base_component}
%define base_version 1.0.0
-%define base_release 2
+%define base_release 3
%define base_group System Environment/Base
%define base_vendor Red Hat, Inc.
%define base_license GPLv2 with exceptions
@@ -221,6 +221,8 @@ rm -rf ${RPM_BUILD_ROOT}
###############################################################################
%changelog
+* Wed Oct 8 2008 Jack Magne <jmagne@redhat.com> 1.0.0-3
+- Bugzilla bug #405451, Vista client support.
* Tue Oct 7 2008 Andrew Wnuk <awnuk@redhat.com> 1.0.0-2
- Bugzilla bug #445436 - Bad search filter is reported by Revoke Certificates in Agent Interface
* Tue Feb 19 2008 PKI Team <pki-devel@redhat.com> 1.0.0-1
diff --git a/pki/linux/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template b/pki/linux/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template
index 993f5e01a..95a978e91 100644
--- a/pki/linux/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template
+++ b/pki/linux/ca-ui/shared/webapps/ca/ee/ca/ProfileSelect.template
@@ -95,7 +95,7 @@ function validate()
crmfObject = crypto.generateCRMFRequest(
"CN=x",
"regToken", "authenticator",
- null,
+ keyTransportCert,
"setCRMFRequest();",
1024, null, "rsa-dual-use");
}
@@ -228,6 +228,7 @@ Sub Send_OnClick
Dim privateKey
Dim request
Dim csr
+ Dim objDN
'certUsage is "1.3.6.1.5.5.7.3.2"
@@ -268,8 +269,19 @@ Sub Send_OnClick
privateKey.ProviderType= index
privateKey.ProviderName = options(index).text
+ szName = "0.9.2342.19200300.100.1.1=" & TheForm.uid.Value & ",E=" & TheForm.email.Value & ",CN=" & TheForm.cn.Value
+
+ Set objDN = g_objClassFactory.CreateObject("X509Enrollment.CX500DistinguishedName")
+
+ If IsObject(objDN) = False Then
+ result = MsgBox("Can't create DN Object. ! " & " Error: " & Err.number & " :" & Err.description,0,"")
+ Exit Sub
+ End If
+
+ objDN.Encode szName,0
+
request.InitializeFromPrivateKey 1,privateKey,""
- request.Initialize(1)
+ request.Subject = objDN
enrollment.InitializeFromRequest(request)
csr=enrollment.CreateRequest(1)
diff --git a/pki/linux/ra-ui/pki-ra-ui.spec b/pki/linux/ra-ui/pki-ra-ui.spec
index 626acdf99..b10b18b71 100644
--- a/pki/linux/ra-ui/pki-ra-ui.spec
+++ b/pki/linux/ra-ui/pki-ra-ui.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_prefix}-%{base_component}
%define base_version 1.0.0
-%define base_release 1
+%define base_release 2
%define base_group System Environment/Base
%define base_vendor Red Hat, Inc.
%define base_license GPLv2 with exceptions
@@ -221,6 +221,8 @@ rm -rf ${RPM_BUILD_ROOT}
###############################################################################
%changelog
+* Thu Oct 02 2008 Jack Magne <jmagne@redhat.com> 1.0.0-2
+- Fix for Vista support, #405451
* Tue Feb 19 2008 PKI Team <pki-devel@redhat.com> 1.0.0-1
- Initial open source version based upon proprietary
Red Hat Certificate System (RHCS) 7.3.
diff --git a/pki/linux/ra-ui/shared/docroot/ee/user/user.vm b/pki/linux/ra-ui/shared/docroot/ee/user/user.vm
index a4f50dbcd..83d9d9517 100644
--- a/pki/linux/ra-ui/shared/docroot/ee/user/user.vm
+++ b/pki/linux/ra-ui/shared/docroot/ee/user/user.vm
@@ -1,7 +1,8 @@
<!-- --- BEGIN COPYRIGHT BLOCK ---
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,6 +24,10 @@
CODEBASE="/ee/xenroll.dll"
id="Enroll">
</OBJECT>
+
+<OBJECT id='g_objClassFactory' CLASSID='clsid:884e2049-217d-11da-b2a4-000e7bbb2b09'>
+</OBJECT>
+
<title>Certificate System</title>
<link rel="shortcut icon" href="/images/favicon.ico" />
<link rel="stylesheet" href="/css/pki-base.css" type="text/css" />
@@ -40,7 +45,7 @@
<ul>
-<li id="mainFirst-active">Certificate System</li>
+<li id="mainFirst-active">Certifcate System</li>
</ul>
</div><!-- end mainNavInner -->
@@ -124,13 +129,43 @@ This form is for user to request for an end-user certificate.
</script>
<SCRIPT LANGUAGE=VBS>
<!--
+'Get OS Version, works for Vista and below only
+Function GetOSVersion
+ dim agent
+ dim result
+ dim pos
+
+ agent = Navigator.appVersion
+ pos = InStr(agent,"NT 6.")
+
+ If pos > 0 Then
+ GetOSVersion = 6 ' Vista
+ Exit Function
+ End If
+
+ pos = InStr(agent,"NT 5.")
+
+ If pos > 0 Then
+ GetOSVersion = 5 ' XP etc
+ Exit Function
+ End If
+
+' Default
+ GetOSVersion = 5
+End Function
Sub Send_OnClick
Dim TheForm
Dim szName
Dim options
+ Dim osVersion
+ Dim result
Set TheForm = Document.enrollment
+ osVersion = GetOSVersion()
+
+ If osVersion <> 6 Then 'Not Vista
+
' Contruct the X500 distinguished name
szName = "0.9.2342.19200300.100.1.1=" & TheForm.uid.Value & ",E=" & TheForm.email.Value & ",CN=" & TheForm.cn.Value
@@ -175,6 +210,78 @@ Sub Send_OnClick
TheForm.csr.Value = szCertReq
' TheForm.Submit
+
+Else 'Vista
+ Dim enrollment
+ Dim privateKey
+ Dim request
+ Dim csr
+ Dim objDN
+
+ 'certUsage is "1.3.6.1.5.5.7.3.2"
+
+ On Error Resume Next
+ 'CreateObject("X509Enrollment.CX509EnrollmentWebClassFactory")
+
+ If IsObject(g_objClassFactory) = False Then
+ result = MsgBox("Can't create Factory Object " & " Error: " & Err.number & " :" & Err.description,0,"")
+ Exit Sub
+ 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
+ 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
+ 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
+ End If
+
+ privateKey.KeySpec= "1"
+
+ ' Pick the provider that is selected
+ set options = TheForm.all.cryptprovider.options
+ index = options.selectedIndex
+ privateKey.ProviderType= index
+ privateKey.ProviderName = options(index).text
+
+ szName = "0.9.2342.19200300.100.1.1=" & TheForm.uid.Value & ",E=" & TheForm.email.Value & ",CN=" & TheForm.cn.Value
+
+ Set objDN = g_objClassFactory.CreateObject("X509Enrollment.CX500DistinguishedName")
+
+ If IsObject(objDN) = False Then
+ result = MsgBox("Can't create DN Object. ! " & " Error: " & Err.number & " :" & Err.description,0,"")
+ Exit Sub
+ End If
+
+ objDN.Encode szName,0
+
+ request.InitializeFromPrivateKey 1,privateKey,""
+ request.Subject = objDN
+
+ enrollment.InitializeFromRequest(request)
+ csr=enrollment.CreateRequest(1)
+
+ If len(csr) = 0 Then
+ result = MsgBox("Error Creating Request! "& " Error: " & Err.number & " :" & Err.description,0,"")
+ Exit Sub
+ End If
+
+ TheForm.csr.Value = csr
+
+ End If
Exit Sub
End Sub
@@ -236,47 +343,86 @@ End Sub
FindProviders
Function FindProviders
- Dim i, j
- Dim providers()
- i = 0
- j = 1
- Dim el
- Dim temp
- Dim first
- Dim TheForm
- Set TheForm = document.enrollment
- On Error Resume Next
- first = 0
-
- Do While True
- temp = ""
- Enroll.providerType = j
- temp = Enroll.enumProviders(i,0)
- If Len(temp) = 0 Then
- If j < 1 Then
- j = j + 1
- i = 0
- Else
- Exit Do
- End If
- Else
- set el = document.createElement("OPTION")
- el.text = temp
- el.value = j
- If temp = "Microsoft Base Cryptographic Provider v1.0" Then
- first = j
+ Dim i, j
+ Dim providers()
+ i = 0
+ j = 1
+ Dim el
+ Dim temp
+ Dim first
+ Dim TheForm
+ Set TheForm = document.enrollment
+ On Error Resume Next
+ first = 0
+
+ Dim osVersion
+ Dim result
+ osVersion = GetOSVersion()
+
+ If osVersion <> 6 Then 'Not Vista
+ Do While True
+ temp = ""
+ Enroll.providerType = j
+ temp = Enroll.enumProviders(i,0)
+ If Len(temp) = 0 Then
+ If j < 1 Then
+ j = j + 1
+ i = 0
+ Else
+ Exit Do
+ End If
+ Else
+ set el = document.createElement("OPTION")
+ el.text = temp
+ el.value = j
+ If temp = "Microsoft Base Cryptographic Provider v1.0" Then
+ first = i
+ End If
+ TheForm.cryptprovider.add(el)
+ If first = 0 Then
+ first = 1
+ TheForm.cryptprovider.selectedIndex = 0
+ Else
+ TheForm.cryptprovider.selectedIndex = first
+ End If
+ i = i + 1
+ End If
+ Loop
+ Else 'Vista
+
+ Dim csps
+ Set csps = g_objClassFactory.CreateObject("X509Enrollment.CCspInformations")
+ If IsObject(csps) = False Then
+ result = MsgBox("Can't create CSP List Object! " & " Error: " & Err.number & " :" & Err.description,0,"")
+ Exit Function
+
+ End If
+ csps.AddAvailableCsps()
+ 'result = MsgBox(csps.Count,0,"Number of CSPS")
+
+ Dim curName
+ Dim csp
+ Dim selected
+ selected = 0
+ For i = 0 to csps.Count-1
+
+ curName = csps.ItemByIndex(i).Name
+ If len(curName) > 0 Then
+ Set csp = document.createElement("OPTION")
+ csp.text = curName
+ csp.value = 1
+ TheForm.cryptprovider.add(csp)
+
+ If curName = "Microsoft Base Cryptographic Provider v1.0" Then
+ selected = i
+ End If
+ 'result = MsgBox(curName,0,"")
+ End If
+ Next
+TheForm.cryptprovider.selectedIndex = selected
End If
- TheForm.cryptprovider.add(el)
- If first = 0 Then
- first = 1
- TheForm.cryptprovider.selectedIndex = 0
- Else
- TheForm.cryptprovider.selectedIndex = first
- End If
- i = i + 1
- End If
- Loop
End Function
+
-->
</SCRIPT>
</form>