diff --git a/ca/request_cert.php b/ca/request_cert.php
index 5e2d1b5..03aeb5d 100644
--- a/ca/request_cert.php
+++ b/ca/request_cert.php
@@ -25,7 +25,8 @@ $passwdv = gpvar('passwdv');
$expiry = gpvar('expiry');
$keysize = gpvar('keysize');
$cert_type = gpvar('cert_type');
-
+$dns_names = gpvar('dns_names');
+$ip_addr = gpvar('ip_addr');
# To repopulate form after error.
$hidden_fields = '
@@ -41,6 +42,8 @@ $hidden_fields = '
+
+
';
@@ -72,10 +75,21 @@ case 'validate':
if ( $email && ! is_email($email) )
$er .= 'E-mail address ('. htvar($email) . ') may be invalid. ';
+ $ip_ar=explode("\n", $ip_addr);
+ foreach ($ip_ar as $value){
+ if ( $value && ! is_ip($value) )
+ $er .= 'IP address ('. htvar($value) . ') may be invalid. ';
+ }
+
+ $dns_n=explode("\n", $dns_names);
+ foreach ($dns_n as $value){
+ if ( $value && ! is_fqdn(trim($value)) )
+ $er .= 'DNS Name ('. htvar($value) . ') may be invalid. ';
+ }
+
if ( $er )
$er = '
ERROR(S) IN FORM:
' . $er . '
';
-
if ($email && ($serial = CAdb_in($email,$common_name))) {
$er = '';
$certtext = CA_cert_text($serial);
@@ -119,6 +133,8 @@ case 'confirm':
Certificate Life
Key Size
Certificate Use
+ IP Addresses
+ DNS Alt Names