diff --git a/includes/account.php b/includes/account.php index 6843710..f026510 100644 --- a/includes/account.php +++ b/includes/account.php @@ -1,5 +1,5 @@ + Copyright (C) 2004-2006 by Duane Groth This file is part of CAcert. @@ -1377,7 +1377,7 @@ $csrsubject = ""; if($org['OU']) - $csrsubject .= "/organizationalUnitName=".$org['OU']; + $csrsubject .= "/organizationalUnitName=".$_SESSION['_config']['OU']; if($org['O']) $csrsubject .= "/organizationName=".$org['O']; if($org['L']) diff --git a/includes/general.php b/includes/general.php index 80b2ceb..605e378 100644 --- a/includes/general.php +++ b/includes/general.php @@ -290,6 +290,7 @@ $bits = explode("|", $bits); $_SESSION['_config']['cnc'] = $_SESSION['_config']['subaltc'] = 0; + $_SESSION['_config']['OU'] = ""; if(is_array($bits)) foreach($bits as $val) @@ -307,6 +308,10 @@ $_SESSION['_config']['cnc']++; $_SESSION['_config'][$k] = $split['1']; } + if($k == "OU" && $split['1'] && $_SESSION['_config']['OU'] == "") + { + $_SESSION['_config']['OU'] = $split['1']; + } if($k == "subjectAltName" && $split['1']) { $k = $_SESSION['_config']['subaltc'].".".$k;