:file:`about_menu.php` is a part (<div>) of a PHP-Page, containing most of
the CAcert-related links.
It uses hardcoded links to some CAcert-sites :samp:`http://blog.cacert.org`, :samp:`http://wiki.CAcert.org/`, :samp:`http://wiki.cacert.org/FAQ/Privileges`, :samp:`http://blog.CAcert.org/feed/`, :samp:`http://wiki.cacert.org/Board`, :samp:`https://lists.cacert.org/wws`
..sourcefile:: includes/account_stuff.php
@ -67,46 +62,62 @@ Directory :file:`includes`
includes/loggedin.php
includes/lib/l10n.php
includes/lib/check_weak_key.php
SOME__checkWeakKeySPKAC
SOME__checkWeakKeyCSR
SOME__checkWeakKeyX509
includes/notary.inc.php
SOME__check_email_exists
SOME__account_email_delete
SOME__write_user_agreement
SOME__account_domain_delete
SOME__valid_ticket_number
SOME__write_se_log
SOME__revoke_all_private_cert
SOME__check_client_cert_running
SOME__check_server_cert_running
SOME__check_gpg_cert_running
SOME__check_is_orgadmin
SOME__account_delete
includes/general.php
SOME__loadem
SOME__csrf_check
SOME__sanitizeHTML
SOME__checkEmail
SOME__make_hash
SOME__generatecertpath
SOME__waitForResult
SOME__clean_csr
SOME__extractit
SOME__getcn
SOME__getalt
SOME__runCommand
includes/account_stuff.php
SOME__showheader
SOME__showfooter
includes/mysql.php
SOME__sendmail
includes/lib/account.php
SOME__HashAlgorithms::clean_csr
:file:`includes/account.php` first loads some more includefiles via :php:func:`loadem`. It defines two functions and read the global variables
:param array(string) $domains:First domain is used as CN and repeated in subjectAltName. Duplicates should already been removed
:param bool $include_xmpp_addr:[default: true] Whether to include the XmppAddr in the subjectAltName. This is needed if the Jabber server is jabber.example.com but a Jabber ID on that server would be alice@example.com
:file:`mysql.php.sample` is a template for the database connection handling
code that is meant to be copied to :file:`mysql.php`.
The template defines the MySQL connection as a session variable `mconn` and
tries to connect to that database. It also defines the session variables
`normalhostname`, `securehostname` and `tverify`.
The template defines the MySQL connection as a session variable :php:global:`$_SESSION['mconn']` while connecting to that database. It also defines the session variables
:php:global:`$_SESSION['_config']['normalhostname']`, :php:global:`$_SESSION['_config']['securehostname']` and :php:global:`$_SESSION['_config']['tverify']`.
..php:global:: $_SESSION['mconn']
This global variable defines the status of the database connection
:file:`include/lib/account.php` defines a function and a class for use by other precedures.
..php:function:: fix_assurer_flag($userID = NULL)
Function to recalculate the cached Assurer status. Update Assurer-Flag on users table if 100 points and CATS passed. We may have some performance issues here if no userID is given there are ~150k assurances and ~220k users currently but the exists-clause on cats_passed should be a good filter.
:param int $userID:if the user ID is not given the flag will be recalculated for all users
:returns:* (bool) - false if there was an error on fixing the flag. This does NOT return the new value of the flag
..php:class:: HashAlgorithms
Supported hash algorithms for signing certificates.
..php:attr:: $default
Default hash algorithm identifier for signing
..php:staticmethod:: getInfo()
Get display strings for the supported hash algorithms.
#. [$hash_identifier]['name'] = Name that should be displayed in UI
#. [$hash_identifier]['info'] = Additional information that can help with the selection of a suitable algorithm
..php:staticmethod:: clean($hash_identifier)
Check if the input is a supported hash algorithm identifier otherwise return the identifier of the default hash algorithm
:param string $hash_identifier:
:returns:* (string) - The cleaned identifier
..sourcefile:: includes/lib/check_weak_key.php
:uses:
includes/lib/general.php
:file:`includes/lib/check_weak_key.php` does the checking of keys for vulnaribilities and therefore provides some functions to be used by other procedures.
Checks whether the given CSR contains a vulnerable key.
This function uses:
:php:func:`checkWeakKeyText`,
:php:func:`failWithId`,
:php:func:`runCommand`
:param string $csr:The CSR to be checked
:param string [optional] $encoding:The encoding the CSR is in (for the "-inform" parameter of OpenSSL, currently only "PEM" (default) or "DER" allowed)
:returns:* (string) - containing the reason if the key is considered weak, empty string otherwise
Checks whether the given X509 certificate contains a vulnerable key.
This function uses:
:php:func:`checkWeakKeyText`,
:php:func:`failWithId`,
:php:func:`runCommand`
:param string $cert:The X509 certificate to be checked
:param string [optional] $encoding:The encoding the certificate is in (for the "-inform" parameter of OpenSSL, currently only "PEM" (default), "DER" or "NET" allowed)
:returns:* (string) - String containing the reason if the key is considered weak, empty string otherwise
Reimplement the functionality of the openssl-vulnkey tool
:param string $text:The text representation of a key as output by the "openssl <foo> -text -noout" commands
:param int [optional] $keysize:If the key size is already known it can be provided so it doesn't have to be parsed again. This also skips the check whether the key is an RSA key => use wisely.
:returns:* (mixed) - TRUE if key is vulnerable, FALSE otherwise, NULL in case of error
..sourcefile:: includes/lib/general.php
:file:`includes/lib/general.php` provides the system with three functions.
:file:`includes/lib/general.php` provides the system with four functions.
Determine if the user with the passed userid is an assurer.
:param int $userid:id of the user to be checked.
:return:* (int) - 0 if user is an assurer; 3,7,11,15 if 100 ssurance points not reached; 5,7,13,15 if assurer test is missing; 9,11,13,15 if not allowed to b an assurer.
:return:* (int) - 0 if user is an assurer; 3,7,11,15 if 100 ssurance points not reached; 5,7,13,15 if assurer test is missing; 9,11,13,15 if not allowed to be an assurer.
An array of possible translations ("ISO-language code" => "native name of the language"). At the moment with values: "ar", "bg", "cs", "da", "de", "el", "en", "es", "fi", "fr", "hu", "it", "ja", "lv", "nl", "pl", "pt", "pt-br", "ru", "sv", "tr", "zh-cn", "zh-tw".