IOS7.1 Enterprise Application & quot; unable to install the application because the certificate is invalid & quot; perfect solution

Source: Internet
Author: User
Tags website server

If no release is made, IOS7.1 installs the development IPA for testing:

Ssl support is required. You must generate ca. crt (used by the terminal credit certificate), and configure server. crt server. key to the local development server.

Http: // 127.0.0.1/apptest/dev.html

1. Generate the server key and certificate. First, install openssl on the server and nginx supports ssl.

Generate the private key of the server:

  openssl genrsa -out server.key 1024  

Generate the signing application (note that except the Common Name, the Common Name must be the server's ip address or domain Name ):

 

  openssl req -new –out server.csr -key server.key

Generate CA private key
  openssl genrsa  -out ca.key 1024  

Use the private key of the CA to generate the self-signed certificate of the CA (note that except the Common Name and organizationName can be empty, the Common Name must be the Server ip address or domain Name, And the organizationName must be consistent with the previous one):
  openssl req  -new -x509 -days 365 -key ca.key -out ca.crt

Create the files index.txtand serialin the current directory, and the serialcontent is, index.txt is empty, and the folder newcerts.

CA signs a certificate for the website Server:

  openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key

Finally, copy server. crt and server. key to the corresponding path above:
  /data/web/server.crt  /data/web/server.key

Note: At last, we need to install the self-created CA certificate on the iphone. Install the ca. crt file generated in step 1 by sending an email or downloading it to the iphone. Use the built-in Mail program (other programs do not work) to open and install the file.

The Nginx configuration is as follows:

Map $ scheme $ fastcgi_https {
Default off;
Https on;
}

Server {
# Listen 443;
Listen 443;
Ssl on;
Ssl_certificate/data/web/server. crt;
Ssl_certificate_key/data/web/server. key;

Server_name 127.0.0.1;
Root/data/default /;
Index. php index.shtml index.html;

Access_log/var/log/httpd/test nginx-access.log;
Error_log/var/log/httpd/nginx-error.log;

Ssl_session_timeout 5 m;

Location ~ *. * \. Php $ {
Include Configs/fcgi-php.conf;
Fastcgi_pass 127.0.0.1: 9000;
}
}


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.