Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get DTLSCompression and an DTLSCipher information #67

Closed
wannaliang opened this issue Dec 18, 2020 · 6 comments
Closed

How can I get DTLSCompression and an DTLSCipher information #67

wannaliang opened this issue Dec 18, 2020 · 6 comments
Labels

Comments

@wannaliang
Copy link

I can go through ipinfo.DTLSOptions Access to x-dtls and other information, but I did not find an effective way to obtain the protocol and other information, whether someone can guide you, thanks

@dlenski
Copy link
Collaborator

dlenski commented Dec 18, 2020

I can go through ipinfo.DTLSOptions Access to x-dtls and other information

Don't do this. The CSTPOptions and DTLSOptions are Cisco-specific and even verison-of-Cisco-server-specific and will break if you're using any other protocol supported by OpenConnect.

(They really shouldn't be in the publicly-visible API at all.)

I did not find an effective way to obtain the protocol and other information

If you're looking for compression and cipher information, then https://gitlab.com/openconnect/openconnect/-/blob/master/java/src/org/infradead/libopenconnect/LibOpenConnect.java#L164-167

@wannaliang
Copy link
Author

Thank you very much for your answer. But I really need that information.I have also looked at libopenconnect.java. But I didn't find a valid way to call such a method as getCSTPCipher, as if the method had no method in the JAR package to call the value. I saw a display of the log information, but I couldn't find where it came from

@cernekee
Copy link
Owner

Can you call mOC.getCSTPCipher()? It should work the same way as the other JNI methods.

I saw a display of the log information

Most of the log messages are generated internally by the C code in libopenconnect, so they can potentially contain information that isn't accessible through the Java bindings. If there is something that's important for the caller to have, the upstream openconnect project might accept library API changes (I had to add a bunch of new APIs to support the Android port).

@wannaliang
Copy link
Author

I've tried using moc.getCstpcipher to get this value, but I've got nothing. I've also tried calling this method in OpenConnectManagementThread.java but it's still empty, and I'm not sure if I can't get the value or if there's something wrong with my calling method

@dlenski
Copy link
Collaborator

dlenski commented Dec 18, 2020

@wannaliang Ensure you are using LibOpenConnect v8.06+ or newer. I did a bunch of bugfixes to the ciphersuite library functions, in particular in https://gitlab.com/openconnect/openconnect/-/commit/dd4693b6058f674671c1f705b55333e5a6c6c8d5 and a few subsequent commits.

@wannaliang
Copy link
Author

Ok, I will update the latest version and try, thank you very much for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants