Summary | Problem importing public keys for S/MIME |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Enhancement |
State | Resolved |
Priority | 2. Medium |
Owners | chuck (at) horde (dot) org |
Requester | holger.richter (at) klst (dot) com |
Created | 2007-12-13 (4785 days ago) |
Due | 12/13/2007 (4785 days ago) |
Updated | 2007-12-28 (4770 days ago) |
Assigned | |
Resolved | 2007-12-28 (4770 days ago) |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
subjectAltName set of email addresses, and committed a similar patch
(that also handles multiple values correctly).
*** framework/Crypt/Crypt/smime.php-orig Wed Aug 22 11:48:04 2007
--- framework/Crypt/Crypt/smime.php Wed Dec 12 16:00:45 2007
***************
*** 1250,1255 ****
--- 1250,1265 ----
} elseif (isset($key_info['subject']['emailAddress'])) {
return $key_info['subject']['emailAddress'];
}
+ }
+ // Hg: the email address could be moved from the subject to the
+ // subjectAltName field
+ if (is_array($key_info) && isset($key_info['extensions'])) {
+ if (isset($key_info['extensions']['subjectAltName'])) {
+ $val = $key_info['extensions']['subjectAltName'];
+ if (trim(stripos($val, "mail:")) == 1) {
+ return substr($val, 7);
+ }
+ }
}
return null;
State ⇒ Feedback
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 2. Medium
Summary ⇒ Problem importing public keys for S/MIME
Due ⇒ 2007-12-13
Queue ⇒ Horde Framework Packages
is also possible to move the email address from the subject to the
subject alternative name.
Horde looks for the mail address only in the subject of the
certificate during the import of the public key. If the address was
moved from the subject to the subject alternative name horde is unable
to import the public key.
I hope this small patch for smime.php is suitable.