This Question is Answered

27 Replies Last post: Jun 18, 2008 5:35 AM by Mark Straver  
Mark Straver Bronze 47 posts since
May 11, 2008
Currently Being Moderated

May 27, 2008 2:26 PM

XMPP certificates + Openfire 3.5.1 = no go?

OK Folks, I've been trying just about everything I can to see what might be the problem with server to server connections, using an XMPP supplied server certificate, and even with:

 

  • xmpp.server.certificate.accept-selfsigned = true

  • xmpp.server.certificate.verify = false

  • xmpp.server.certificate.verify.chain = false

  • xmpp.server.certificate.verify.root = false

  • xmpp.server.certificate.verify.validity = false

 

I keep getting errors (undeliverable packets when requiring secure connections) and cannot get server 2 server connected using secure connections (they use a fallback dialback over plain text) -- client2server from my clients is fine, encryption works both using TLS and the old SSL method (even without the parameters above).

 

Even with these parameters set, the certmanager keeps complaining about the certificate (which has a double CN of which the first is a second level domain I use) and tells me the following:

 

2008.05.19 11:57:10 CertificateManager: SubjectAltName of invalid type found: EMAILADDRESS=XXXXX@wolfbeast.com, CN=wolfbeast.com, CN=jabber.wolfbeast.com, OU=Domain validated only, O=XXXXX, L=SkxC3xB6vde, C=SE

 

 

 

Update: From what I understood from other messages this debug message means that the xmpp extensions in the certificate are considered invalid and it would try the subject instead as a fallback (which would have thew same problem as that also has a first CN being the 2nd level domain and the second one being the actual correct hostname)...

 

 

Does this just mean that Openfire 3.5.1 simply cannot handle the certificate that was given out by XMPP.net? Is there a way around this error?

Should I go back to an earlier version of Openfire/Wildfire, one that is confirmed to work (and which one would that be)?

 

 

Thanks.

 

Mark.

 

Message was edited by: wolfbeest

Jason Bronze 10 posts since
Jun 5, 2008
Currently Being Moderated
Jun 5, 2008 1:37 PM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

I'm having the same problem with s2s tls not working. The best I can see is in tests with the jabber.org server, it attempts to setup tls, exchanges certificates, but then just closes the connection and reverts to dialback. Because the cert works for c2s connections, I'm pretty sure that the cert itself is good, but OF is not doing something right with it.

 

IMO, the error from CertificateManager is bogus. After having looked at the code, what triggers that error message are non-otherName types in the SubjectAlternativeName field. I have a DNS type name on my certificate as well as the XMPP otherName and that DNS type causes that error message to pop up for me. Here is an openssl dump of the SubjectAlternativeName field on my cert...

 

X509v3 Subject Alternative Name:

othername:]]>, DNS:domain.org

 

Even though that error pops up, it does process the otherName that is on my certificate.

 

I'm still digging into this problem and will post more as I find answers.

Gaston Dombiak Jiver 3,751 posts since
Sep 26, 2001
Currently Being Moderated
Jun 6, 2008 1:07 AM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

Hey Mark,

 

I was not aware that a subjectDN could have several CN values. I filed this issue as JM-1384 and checked in a fix for this. It will be included for Openfire 3.5.2 to be released next week.

 

Thanks,

 

  -- Gato

Gaston Dombiak Jiver 3,751 posts since
Sep 26, 2001
Currently Being Moderated
Jun 6, 2008 1:59 PM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

Hey Mark,

 

The "CertificateManager: SubjectAltName of invalid type found: debug message is not printing the SubjectAltName but the subject DN. In fact that debug message should print the SubjectAlternativeName (that is not good for XMPP) or we should just get rid of that debug message. Anyway, AFAIK there is only one domain per SubjectAlternativeName and a certificate may have several SubjectAlternativeNames. That is why I suspect that if your certificate was not working in Openfire then it didn't have an XMPP SubjectAlternativeName and its subjectDN had more than one CN. And we fixed the latter so it should work now.

 

Regards,

 

  -- Gato

Jason Bronze 10 posts since
Jun 5, 2008
Currently Being Moderated
Jun 6, 2008 2:17 PM in response to: Gaston Dombiak
Re: XMPP certificates + Openfire 3.5.1 = no go?

Over in the dev forum, I submitted a patch last night to get rid of that debug message.

Jason Bronze 10 posts since
Jun 5, 2008
Currently Being Moderated
Jun 6, 2008 2:38 PM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

Your two DNS Names are what triggers the invalid type messages and can be safely ignored. XMPP doesn't care about the DNS types, but instead of silently ignoring them, it throws the invalid type debug messages which IMO is wrong. The first otherName there is the XMPP otherName and it should be seen even though you get the complaints about the invalid type complaints about the DNS names.

Gaston Dombiak Jiver 3,751 posts since
Sep 26, 2001
Currently Being Moderated
Jun 6, 2008 3:16 PM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

Hey Mark,

 

If your certificate is using 1.3.6.1.5.5.7.8.5 then I don't know why the extension is not accepted. If you want you can send me your certificate so I can debug it here.

 

Thanks,

 

  -- Gato

Jason Bronze 10 posts since
Jun 5, 2008
Currently Being Moderated
Jun 6, 2008 5:46 PM in response to: Gaston Dombiak
Re: XMPP certificates + Openfire 3.5.1 = no go?

I was looking at the raw bytes in his otherName type and it looks different from mine. I have two layers of TaggedObject wrapping my UTF8String. His looks like it might be just a UTF8String with no TaggedObject wrappers. If that is the case, then it wouldn't decode properly and that could be causing his problems.

 

EDIT: Here are the raw bytes from my xmpp otherName attribute...

 

otherName:1.3.6.1.5.5.7.8.5 = a0 0f a0 0d 0c 0b 77 6f 6c 66 6e 65 74 2e 6f 72 67

 

I have the two a0 layers around the 0c layer, which the other cert does not have. Because the tagged layer decoding are hard coded in the current code, it can't handle this situation. Part of my otherName patch that I submitted last night would handle this correctly.

 

EDIT: For reference, I used openssl to generate my cert, with the openssl config at XMPP_Server_Certificates

Jason Bronze 10 posts since
Jun 5, 2008
Currently Being Moderated
Jun 7, 2008 9:33 PM in response to: Mark Straver
Re: XMPP certificates + Openfire 3.5.1 = no go?

The 0c and 0d are not interpreted as part of the string. That data is a Type-Length-Value attribute. The 0c is the type, in this case UTF8String, the 0d is the length, 13 bytes, and then you have your 13 character domain name.

 

If you look at my othername, I have a a0 0f a0 0d before the 0c type. Those are wrapper layers around the UTF8String. I have no idea what they technically do, but they're there and need unwrapping to get to the real type.