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

Added Secur32#QueryContextAttributes #745

Conversation

barney2k7
Copy link
Contributor

e.g. to retrieve package info

@matthiasblaesing
Copy link
Member

@barney2k7 this looks good. Could you please:

  • squash the commits into one change (rewrite history, squash the changes into one commit and force a push to github)
  • replace the "System.out" in Secur32Test with asserts -- I'd suggest this:
--- a/contrib/platform/test/com/sun/jna/platform/win32/Secur32Test.java
+++ b/contrib/platform/test/com/sun/jna/platform/win32/Secur32Test.java
@@ -392,8 +392,14 @@
                 Secur32.INSTANCE.QueryContextAttributes(phServerContext, Sspi.SECPKG_ATTR_PACKAGE_INFO, packageinfo));
         ByReference info = packageinfo.PackageInfo;
 
-        System.out.println("used security package: " + info.Name + " " + info.Comment);
+//        System.out.println("used security package: " + info.Name + " " + info.Comment);
 
+        assertNotNull(info.Name);
+        assertNotNull(info.Comment);
+        
+        assertTrue(! info.Name.isEmpty());
+        assertTrue(! info.Comment.isEmpty());
+
         assertEquals(W32Errors.SEC_E_OK, Secur32.INSTANCE.FreeContextBuffer(info.getPointer()));
 
         // release server context

e.g. to retrieve package info
@barney2k7 barney2k7 force-pushed the secur32_query_context_attributes branch from e59a89e to 7cf905e Compare December 27, 2016 07:26
@barney2k7
Copy link
Contributor Author

Updated the test case and squashed the commits, as @matthiasblaesing suggested.

@matthiasblaesing matthiasblaesing merged commit 981510e into java-native-access:master Dec 27, 2016
@matthiasblaesing
Copy link
Member

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants