Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Issue faced when using M2Mqtt client with  WinRTapplication

Hi Mike,


Thanks for the response. I am yet to check on the MessageSight version.


Fom your response on initializing the MqttClient with the certificate object, I wanted to clarify one thing quickly. The WinRT Paho client has only two constructors for MqttClient. It just takes broker host name, broker port and a boolean parameter for security.


So the only option is to set this secure parameter as true. You can see my original mail on the details of what happens when this parameter is set to true and when set to false.


I am not able to understand a way to pass the certificate.


Am I missing anything here. Do we need some specific configuration to be done at MessageSight for .Net/ WinRT clients? MessageSight is not owned by us. If we can know of something specific we can request the concerned team to check on it.

Also in the below link there is no mention of .NET client for MessageSight.

https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q028880_.htm


Please help.

Thanks and Regards,

Seena L.S.
________________________________
From: paho-dev-request@xxxxxxxxxxx
Sent: Wednesday 22 June 2016 9:30 pm
To: paho-dev@xxxxxxxxxxx
Subject: paho-dev Digest, Vol 54, Issue 15


Send paho-dev mailing list submissions to
        paho-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://dev.eclipse.org/mailman/listinfo/paho-dev
or, via email, send a message with subject or body 'help' to
        paho-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
        paho-dev-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of paho-dev digest..."


Today's Topics:

   1. Re: Issue faced when using M2Mqtt client with
      WinRTapplication (Mike Tran)


----------------------------------------------------------------------

Message: 1
Date: Wed, 22 Jun 2016 01:07:58 -0500
From: "Mike Tran" <miketran@xxxxxxxxxx>
To: General development discussions for paho project
        <paho-dev@xxxxxxxxxxx>
Subject: Re: [paho-dev] Issue faced when using M2Mqtt client with
        WinRTapplication
Message-ID:
        <OF3F509CBB.BF3D4EDE-ON00257FDA.0015F91C-86257FDA.0021AFAB@xxxxxxxxxxxxxxxxxxxxxxx>

Content-Type: text/plain; charset="utf-8"

Hi Seena,

I am not the developer of the client library for .Net and WinRT. I am
trying to respond to what I know...

It seems like you are connecting to a secured endpoint of the MessageSight
server.  If so, you will need to obtain the CA certificate and put it on
the tablet. Then, you will need to pass the certificate object when you
instantiate  the MqttClient object.  For example:

        // The path to the certificate.
        string caCertPath = "caCert.cer";

        // Load the certificate into an X509Certificate object.
        X509Certificate caCert= new X509Certificate(caCertPath);

        client = new MqttClient(host, port, true, caCert, null,
MqttSslProtocols.TLSv1_1);

Note that if the security profile for the endpoint is configured for
client authentication, then you will need to load the client certificate
and pass it in, e.g.
        client = new MqttClient(host, port, true, caCert, clientCert,
MqttSslProtocols.TLSv1_1);

Are you connecting to MessageSight 1.2 ?  Please check out IBM Knowledge
Center regarding security requirements:
https://www.ibm.com/support/knowledgecenter/SSCGGQ_1.2.0/com.ibm.ism.doc/Security/se00000_.html

--
Regards,
Mike Tran



From:   "Seena Latha  Sasidharan" <Seena_Sasidharan@xxxxxxxxxxx>
To:     "paho-dev@xxxxxxxxxxx" <paho-dev@xxxxxxxxxxx>
Date:   06/20/2016 06:10 AM
Subject:        [paho-dev] Issue faced when using M2Mqtt client with WinRT
application
Sent by:        paho-dev-bounces@xxxxxxxxxxx



Hi,

I need to connect to IBM MessageSight  Server from WinRT application.
Downloaded the M2Mqtt source project and referred in my application.

Client is initialized as
client = new MqttClient(host, port,false);

Connect method is called as
client.Connect(clientId, userName, token, true, 10);

An exception saying ?An existing connection was forcibly closed by the
remote host? is thrown.
This happens in the Receive(byte[] buffer, int timeout) method of
MqttNetworkChannel class.

If client is initialzed with secure parameter set to true MqttClient(host,
port,true) the below exception is thrown.
?A certificate chain processed, but terminated in a root certificate which
is not trusted by the trust provider?

This I got when I debugged the MqttClient. For WinRT application do we
need a CA certificate to be installed on client?

What am I missing? For WinRT is there a way to ignore certificate and
connect to the server.
Please help. I have already spend couple of days with this issue and now
it has become a blocker for me to proceed with my application
implementation.

Please let me know what is the right approach when connecting to IBM
MessageSight from a Windows 8.1 app on tablet using the Paho client.

Thanks in advance.

Regards,
Seena L.S.
 _______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/paho-dev/attachments/20160622/593776fc/attachment.html>

------------------------------

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

End of paho-dev Digest, Vol 54, Issue 15
****************************************


Back to the top