ios產生自我簽署憑證,實現web下載安裝app

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   io   ar   for   檔案   

抄自http://beyondvincent.com/blog/2014/03/17/five-tips-for-using-self-signed-ssl-certificates-with-ios/

 

ios7以後,inhouse安裝需要ssl了,一般用商用的,不想用商用的,就自己弄一個,通過openssl直接產生自簽名的認證以後,golang伺服器可以直接用,但是會提示不合法,plist安裝會失敗

 

因此,需要自己弄一個ca(憑證授權單位),每個裝置裝一下這個就可以了

openssl genrsa -out myCA.key 2048openssl req -x509 -new -key myCA.key -out myCA.cer -days 36500 -subj /CN="My Custom CA"

比較無恥,弄了個100年的,通過瀏覽器在ios裝置上安裝這個ca即可

 

下面我們根據這個ca建立需要的key和cert檔案

openssl genrsa -out mycert.key 2048

下面建立csr,注意,網域名稱一定要對上

openssl req -new -out mycert.req -key mycert.key -subj /CN=www2.mysite.com

 

最後用csr建立cert

openssl x509 -req -in mycert.req -out mycert.cer -CAkey myCA.key -CA myCA.cer -days 36500 -CAcreateserial -CAserial serial

嗯,一樣是無恥的100年

 

嗯,mycert.key和mycert.cer在golang伺服器可以用了

ios產生自我簽署憑證,實現web下載安裝app

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.