From 90dcf899dae9bff3dc9d7e7953e2841dadea178f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20T=C3=A4nzer?=
Date: Tue, 5 Mar 2013 23:08:48 +0100
Subject: Source code taken from cacert-20130227.tar.bz2
---
includes/account.php | 1 +
includes/keygen.php | 128 +++++++++++
locale/Makefile | 3 +-
pages/account/12.php | 8 +-
pages/account/17.php | 122 +----------
pages/account/4.php | 175 +--------------
pages/index/4.php | 8 +-
www/keygenIE.js | 609 +++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 753 insertions(+), 301 deletions(-)
create mode 100644 includes/keygen.php
create mode 100644 www/keygenIE.js
diff --git a/includes/account.php b/includes/account.php
index 8125602..496c7ca 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -422,6 +422,7 @@
`created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
`subject`='".mysql_real_escape_string($csrsubject)."',
`codesign`='".$_SESSION['_config']['codesign']."',
+ `disablelogin`='".($_SESSION['_config']['disablelogin']?1:0)."',
`rootcert`='".$_SESSION['_config']['rootcert']."'";
mysql_query($query);
$emailid = mysql_insert_id();
diff --git a/includes/keygen.php b/includes/keygen.php
new file mode 100644
index 0000000..09ec7f9
--- /dev/null
+++ b/includes/keygen.php
@@ -0,0 +1,128 @@
+ /*
+ LibreSSL - CAcert web application
+ Copyright (C) 2004-2011 CAcert Inc.
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+if (array_key_exists('HTTP_USER_AGENT',$_SERVER) && strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { ?>
+
+
+
+
+
=_('Could not initialize ActiveX object required for certificate generation.')?>
+
=_('You have to enable ActiveX for this to work. On Windows Vista, Windows 7 and '.
+ 'later versions you have to add this website to the list of trusted sites '.
+ 'in the internet settings.')?>
+
Internet Options -> Security -> Trusted '.
+ 'Websites", click on "Custom Level", set "ActiveX control '.
+ 'elements that are not marked as safe initialized on start in '.
+ 'scripts" to "Confirm" and click "OK". Now click "Sites", add '.
+ '"%s" and "%s" to your list of trusted sites and make the '.
+ 'changes come into effect by clicking "Close" and "OK".'),
+ 'https://'.$_SESSION['_config']['normalhostname'],
+ 'https://'.$_SESSION['_config']['securehostname'])?>
+
+
+
+
+
+
+
+ =_('Could not generate certificate request. Probably you need to '.
+ 'choose a different algorithm.')?>
+
+
+ =_('Could not generate certificate request. Please confirm the '.
+ 'dialogue if you are asked if you want to generate the key.')?>
+
+
+ =_('Could not generate certificate request. Please make sure the '.
+ 'cryptography device (e.g. the smartcard) is connected.')?>
+
+
+ =_('Could not generate certificate request.')?>
+
+
+ =_('You have specified an invalid key size')?>
+
+
+ =_('Could not initialize the cryptographic module for your '.
+ 'platform. Currently we support Microsoft Windows XP, Vista '.
+ 'and 7. If you\'re using one of these platforms and see this '.
+ 'error message anyway you might have to enable ActiveX as '.
+ 'described in the red explanation text and accept loading of '.
+ 'the module.')?>
+
+
+
+
+ } else { ?>
+
+
+
+ }
diff --git a/locale/Makefile b/locale/Makefile
index 1517066..4215a4f 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -176,7 +176,8 @@ upload.clean: template.clean
messages.pot: $(GETTEXT_FILES)
xgettext --output - --sort-by-file --copyright-holder "CAcert Inc." \
--package-name "CAcert" --package-version "$(VERSION)" \
- --msgid-bugs-address "translations-admin@cacert.org" $^ | \
+ --msgid-bugs-address "translations-admin@cacert.org" \
+ --add-comments=TRANSLATORS $^ | \
# replace place holders in the lines before the first msgid\
sed '1,/^msgid/ { s/SOME DESCRIPTIVE TITLE/$(DESCRITPION)/; s/YEAR/$(COPYRIGHT_YEAR)/; s/PACKAGE/$(PACKAGE)/ }' \
> $@
diff --git a/pages/account/12.php b/pages/account/12.php
index 44926ca..fa8b41a 100644
--- a/pages/account/12.php
+++ b/pages/account/12.php
@@ -36,7 +36,7 @@
`domaincerts`.`expire` as `expires`, `revoked` as `revoke`,
UNIX_TIMESTAMP(`revoked`) as `revoked`, `CN`, `domaincerts`.`serial`, `domaincerts`.`id` as `id`
from `domaincerts`,`domains`
- where `memid`='".intval($_SESSION['profile']['id'])."' and `deleted`=0 and `domaincerts`.`domid`=`domains`.`id` ";
+ where `memid`='".intval($_SESSION['profile']['id'])."' and `domaincerts`.`domid`=`domains`.`id` ";
if($viewall != 1)
{
$query .= "AND `revoked`=0 AND `renewed`=0 ";
@@ -49,7 +49,7 @@
{
?>
=_("From here you can delete pending requests, or revoke valid certificates.")?>
+
-
=_("From here you can delete pending requests, or revoke valid certificates.")?>
diff --git a/pages/account/17.php b/pages/account/17.php
index 2ba5390..8ac8b65 100644
--- a/pages/account/17.php
+++ b/pages/account/17.php
@@ -14,124 +14,6 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/ ?>
- if(array_key_exists('HTTP_USER_AGENT',$_SERVER) && strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { ?>
-
-
-
- } else { ?>
-
-
-
- } ?>
+require_once($_SESSION['_config']['filepath'].'/includes/keygen.php');
diff --git a/pages/account/4.php b/pages/account/4.php
index a4d6597..8ac8b65 100644
--- a/pages/account/4.php
+++ b/pages/account/4.php
@@ -14,177 +14,6 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/ ?>
- if(array_key_exists('HTTP_USER_AGENT',$_SERVER) && strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { ?>
-
-
-
- } else { ?>
-