Posts

Showing posts with the label ssl-certificate

Composer Require 'package' throws OpenSSL error

Image
Clash Royale CLAN TAG #URR8PPP Composer Require 'package' throws OpenSSL error This problem seems to be common, and i've been through a lot of SO posts related to it and nothing works, and i'm going crazy. Setup : What Works : What does not work : Installing a package I cannot reach https://packagist.org/ with firefox (unsecure connection) The error i get with composer require : [ComposerDownloaderTransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed php -r "var_dump(openssl_get_cert_locations());" Returns this : array(8) { ["default_cert_file"]=> string(25) "c:/usr/local/ssl/cert.pem" ["default_cert_file_env"]=> string(13) "SSL_CERT_FILE"...

Insert pkcs12 to mobileconfig file

Image
Clash Royale CLAN TAG #URR8PPP Insert pkcs12 to mobileconfig file How do I insert a .p12 file in a .mobileconfig file ? .p12 .mobileconfig Apple configuration utility currently performs some unknown transformation/encoding on the .p12 file while inserting it in .mobileconfig (It is just an XML file). .mobileconfig I want to create this .mobileconfig file without using the Apple iPhone configuration utility by directly creating an XML file. Thanks 5 Answers 5 One way to accomplish this is base64 encoding the PKCS#12 file. This, for instance, works with PHP openssl_pkcs12_export( $strCertPEM, $strCertPkcs12, $resKey, $strCertPW ); $arrCertBase64 = str_split( base64_encode($strCertPkcs12), 52); $xmlUserCertPlist = plistVar('PayloadContent',$arrCertBase64,'data'); function plistVar($key,$var,$type) { //...snip... if ( $type == 'data' ) return plistData($key,$var); /...