UIWebview reports incorrect error for SSL certificate with invalid date

Originator:jon.trainer
Number:rdar://11701937 Date Originated:19-Jun-2012 01:46 PM
Status:Open Resolved:
Product:iPad SDK Product Version:iOS 5.x
Classification:Serious Bug Reproducible:Always
 
Summary:
UIWebview reports the wrong error when detecting an SSL certificate with past or present valid date range.

Steps to Reproduce:

1. Set iOS device (iPhone, iPad, or iPod Touch) to use a manual Date & Time (i.e. turn off "Set Automatically" in Settings > Date & Time > Set Automatically).

2. Set Date to some date in the distant past (i.e. Jan. 1, 2001).

3. Open a secure web page with a valid SSL Certificate using UIView

4. Witness error returned by - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error will be NSURLErrorServerCertificateUntrusted instead of NSURLErrorServerCertificateNotYetValid or NSURLErrorServerCertificateHasBadDate.

Expected Results:
Expected an error matching NSURLErrorServerCertificateNotYetValid or NSURLErrorServerCertificateHasBadDate.

Actual Results:
Received error NSURLErrorServerCertificateUntrusted.

Regression:


Notes:
This has the negative effect of our code not knowing which error and resolution to display.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!