AzoftCase StudiesHow to Fix ‘Certificate is not valid’ Error for Enterprise Apps on iOS 7.1

How to Fix ‘Certificate is not valid’ Error for Enterprise Apps on iOS 7.1

By Anton Demenev on March 19, 2014

How to Fix 'Certificate is not valid' Error for Enterprise Apps on  iOS 7.1

The recent Apple’s update to iOS 7.1 has brought down our local distribution channels hosted on Any installation attempt caused the ‘Cannot install applications because the certificate is not valid’ error. Here's how we solved the problem.

What happened

The 7.1 update forced all software installation services to use the HTTPS protocol, also covering non-standard itms-services:// URLs.

How to fix

Changing the protocol type will do the trick:


To solve the problem, we used the Class 1 StartSSL certificate. Below you’ll find the Apache config that adds certificate support and a code snippet for changing links in existing *.plist files automatically.

Apache config

  • – the decrypted private key
  •  – your subdomain certificate
  • – the certificate chain

Since the old services used the HTTP protocol, you need to enable Apache server name options for VirtualHost.

Add the following line to the httpd.conf file:

NameVirtualHost *:443

Now you need to duplicate the VirtualHost config and set a redirect from HTTP to HTTPS. Clone the file and add the line to first copy:

Redirect permanent /

Adding the following certificates directives to the in second config file (change VrtualHost port and instance name, if needed.):

<VirtualHost *:443>

  SSLEngine on
   SSLProtocol all -SSLv2

   SSLCertificateFile /etc/apache2/ssl/
   SSLCertificateKeyFile /etc/apache2/ssl/
   SSLCertificateChainFile /etc/apache2/ssl/

Make sure that the VirtualHost files have ServerName parameters.

Save files and restart Apache. For centOS:

# service apache2 restart

Now you can edit old *.plist files. This step will work only if you have XML *.plists.

Run terminal:

$ cd <your server root>
$ find ./ -name \*.plist -type f -print0 | xargs -0 perl -pi -e 's/http:/https:/'

This command changes URLs in all *.plist files stored in a local directory.

Note. If you’ve got SVN services hosted on this server, you might see an error on a MacOS SVN client: Client is not working with ‘SSL handshake error’. To fix, add the following SSL directives for the SVN VirtualHost.

SSLProtocol all -SSLv2
VN:F [1.9.22_1171]
Rating: 4.6/5 (17 votes cast)
VN:F [1.9.22_1171]
Rating: +6 (from 14 votes)
How to Fix 'Certificate is not valid' Error for Enterprise Apps on iOS 7.1, 4.6 out of 5 based on 17 ratings

Content created by Anton Demenev