0

I'm trying to use WSO2 EMM service. I downloaded the Binary file and uploaded it to my server and configured the ipaddress into it. And then, I started it, yes it works fine. This is my address <a href=https://ip:94433/emm/>. Normal admin admin. But, I tried to register my device, but it wouldn't register.I keep getting authentication failed. The server address i used is ip. Please help in anyway you can, I'll be very glad if I can get through how to register devices.

Thanks.

Community
  • 1
  • 1
  • I connected my android device to my laptop and opened eclipse to check the Logcat. When I try to connect to your server, I get the error message "Wrong version of Key store". Did you enable the SERVER_PROTOCOL to https and if so did you create the bks file using the CA that you used to sign the SSL certificate as in the [documentation](https://docs.wso2.com/display/EMM110/iOS+Server+Configurations). When you are converting to bks use bouncycastle 1.46. – Nira Sep 11 '14 at 09:59
  • Yes, I did the enabled the server protocol to accept https, and I don't know about the bks file. And the instruction you sent are for iOS. I'm provisioning for Android only –  Sep 11 '14 at 10:02
  • Since you have enabled https, the agent app needs to trust the EMM server. In order to do that you need to generate a SSL certificate which is mentioned in the iOS part since it is compulsory for iOS. In the Android [documentation](https://docs.wso2.com/display/EMM110/Android+Configurations), there is a Note about SSL. You need to follow that if you change the SERVER_PROTOCOL to https. You need to also change the SERVER_PORT to 9443. – Nira Sep 11 '14 at 10:09
  • I changed the port to 9443 too. Now, I think I've to create a BKS file. But, the BKS is APN(Apple Push Notification) –  Sep 11 '14 at 10:10
  • BKS is not APNS. BKS is the file that you need to create using the CA certificate that you used to sign the SSL certificate. The BKS needs to be then insert into the android source code so that the agent app will trust the connection with the EMM server. – Nira Sep 11 '14 at 10:27
  • Sorry, any help on how to do it wouldn't be bad. I've been trying to follow the instructions in the documentation, but it's not well Staged, it's like you go here to find this, go there to find that. I make .p12 here and here it's openssl.cnf and there something else. It's not in steps. You go somewhere else. It's not well documented. Please, if you can help out, please do. Thanks –  Sep 11 '14 at 10:58

1 Answers1

0

Seems you have issue with HTTPS

Please follow these steps: step 2 to step 8 https://docs.wso2.com/display/EMM110/iOS+Server+Configurations#iOSServerConfigurations-step2

After that, you can generate the BKS file using following command:

keytool -noprompt -import -v -trustcacerts -alias 'openssl x509 -inform PEM -subject_hash -noout -in ca_cert.pem' -file ca_cert.pem -keystore emm_truststore.bks -storetype BKS -providerclass org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-jdk16-146.jar -storepass 'wso2carbon'

Note: you need to have bcprov-jdk16-146.jar in the folder in order to generate above bks file

Once you generate it copy emm_truststore.bks to Android res/raw folder. In android source code CommonUtilities.java change SERVER_PORT to 9443 and SERVER_PROTOCOL to https://

Chatura Dilan
  • 1,502
  • 1
  • 16
  • 29
  • In the Keytool command that Chatura has mentioned, after -storepass is a password for your BKS file. You need to put this password to TRUSTSTORE_PASSWORD in CommonUtilities.java in the Android source code. – Nira Sep 11 '14 at 11:15
  • keytool -importkeystore -srckeystore .p12 -srcstoretype PKCS12 -destkeystore This command gives me error -bash: syntax error near unexpected token `newline' –  Sep 11 '14 at 12:25
  • See the error I get while using Keytool keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded –  Sep 11 '14 at 19:42
  • Please see this [Link](http://stackoverflow.com/questions/25797605/android-wso2-emm-jks-keystore-error-prevents-service-from-running) –  Sep 11 '14 at 22:34