Skip to content

Added Secur32#QueryContextAttributes#745

Merged
matthiasblaesing merged 1 commit intojava-native-access:masterfrom
barney2k7:secur32_query_context_attributes
Dec 27, 2016
Merged

Added Secur32#QueryContextAttributes#745
matthiasblaesing merged 1 commit intojava-native-access:masterfrom
barney2k7:secur32_query_context_attributes

Conversation

@barney2k7
Copy link
Copy Markdown
Contributor

e.g. to retrieve package info

@matthiasblaesing
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants