Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for verification (0.11 sec)

  1. src/main/java/jcifs/util/transport/Response.java

         * @param size the size of the signature data
         * @return whether signature verification is successful
         */
        boolean verifySignature(byte[] buffer, int i, int size);
    
        /**
         * Checks if signature verification failed.
         *
         * @return whether signature verification failed
         */
        boolean isVerifyFailed();
    
        /**
         * Checks if the response indicates an error.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/SMBSigningDigest.java

     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    package jcifs.internal;
    
    /**
     * Interface for SMB message signing and verification operations.
     * Provides cryptographic signing capabilities for SMB protocol messages to ensure
     * message integrity and authenticity using MAC (Message Authentication Code) algorithms.
     *
     * @author mbechler
     */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/smb1/FileEntryTest.java

    /**
     * Unit tests for {@link FileEntry}. The interface itself has no
     * implementation, so the tests exercise the contract via Mockito mocks.
     * Each method is exercised for normal inputs, extreme or edge cases, and
     * interaction verification.
     */
    import static org.junit.jupiter.api.Assertions.assertEquals;
    import static org.junit.jupiter.api.Assertions.assertNull;
    import static org.mockito.Mockito.mock;
    import static org.mockito.Mockito.times;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb2/Smb2SigningDigest.java

                // Use constant-time comparison to prevent timing attacks
                if (!MessageDigest.isEqual(sig, cmp)) {
                    return false; // Signature verification failed
                }
                return true; // Signature verification succeeded
            } finally {
                this.signingLock.unlock();
            }
        }
    
        /**
         * Securely wipe signing key from memory
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java

                assertTrue(result);
                assertFalse(response.isVerifyFailed());
            }
    
            @Test
            @DisplayName("Should handle signature verification failure")
            void testVerifySignatureFailure() {
                byte[] buffer = new byte[100];
                response.setDigest(mockDigest);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/Smb2EchoResponseTest.java

                assertFalse(echoResponse.isVerifyFailed());
                verify(mockDigest).verify(buffer, 0, 100, 0, echoResponse);
            }
    
            @Test
            @DisplayName("Should fail signature verification when digest verification fails")
            void testVerifySignatureFailed() throws Exception {
                byte[] buffer = new byte[1024];
                echoResponse.setDigest(mockDigest);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/util/transport/ResponseTest.java

            int offset = 0;
            int size = 3;
    
            // Simulate successful verification
            when(mockResponse.verifySignature(buffer, offset, size)).thenReturn(true);
            assertTrue(mockResponse.verifySignature(buffer, offset, size));
    
            // Simulate failed verification
            when(mockResponse.verifySignature(buffer, offset, size)).thenReturn(false);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbNamedPipeTest.java

        void customizeCreateSetsFlagsAndExtended() throws Exception {
            // Arrange: real instance to call protected method; collaborators mocked for interaction verification
            SmbNamedPipe pipe = new SmbNamedPipe("smb://server/IPC$/foo", SmbPipeResource.PIPE_TYPE_RDWR, ctx());
            SmbComNTCreateAndX req = mock(SmbComNTCreateAndX.class);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/TransTransactNamedPipeResponseTest.java

        @Test
        void testToString() {
            String result = response.toString();
            assertNotNull(result, "toString() should not return null.");
        }
    
        // Helper method to access the super.toString() for verification,
        // as we cannot call it directly from the test.
        // This requires a package-private or public method in the class under test,
        // or we can just check for the prefix and suffix.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

            @DisplayName("Should correctly verify signatures - regression test for inverted logic bug")
            void testVerifySignatureLogicRegression() throws Exception {
                // This test ensures the signature verification logic is not inverted
                // Previously there was a bug where verify returned true for invalid signatures
    
                // Set signed flag
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
Back to top