Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for wrong (3.69 sec)

  1. src/test/java/jcifs/internal/smb2/session/Smb2SessionSetupResponseTest.java

            int headerStart = 0;
            buildHeader(buf, headerStart, NtStatus.NT_STATUS_SUCCESS, 0x0001, 0x0L);
    
            int bodyStart = headerStart + Smb2Constants.SMB2_HEADER_LENGTH;
            // Wrong structure size (should be 9)
            SMBUtil.writeInt2(8, buf, bodyStart);
            SMBUtil.writeInt2(0, buf, bodyStart + 2);
            SMBUtil.writeInt2(Smb2Constants.SMB2_HEADER_LENGTH + 8, buf, bodyStart + 4);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/smb2/ServerMessageBlock2Response.java

         */
        @Override
        public boolean verifySignature(final byte[] buffer, final int i, final int size) {
            // observed too that signatures on error responses are sometimes wrong??
            // Looks like the failure case also is just reflecting back the signature we sent
    
            // with SMB3's negotiation validation it's no longer possible to ignore this (on the validation response)
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/util/SecureCredentialStorageTest.java

                assertThrows(GeneralSecurityException.class, () -> {
                    storage2.decryptCredentials(encrypted);
                }, "Should throw GeneralSecurityException when decrypting with wrong salt");
            } finally {
                storage2.close();
            }
    
            // Clean up
            Arrays.fill(plaintext, '\0');
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/io/Smb2WriteResponseTest.java

            @Test
            @DisplayName("Should throw exception for invalid structure size")
            void testInvalidStructureSize() {
                byte[] buffer = new byte[64];
                SMBUtil.writeInt2(16, buffer, 0); // Wrong structure size (should be 17)
    
                assertThrows(SMBProtocolDecodingException.class, () -> {
                    response.readBytesWireFormat(buffer, 0);
                }, "Expected structureSize = 17");
            }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/create/Smb2CreateResponseTest.java

            Smb2CreateResponse resp = new Smb2CreateResponse(config, "bad");
    
            byte[] header = buildSmb2Header();
            byte[] body = new byte[2 + 2 + 4];
            // Wrong structure size (e.g., 0)
            SMBUtil.writeInt2(0, body, 0);
            // The rest of the fields are irrelevant since it should fail early
            byte[] packet = buildPacket(header, body, null, null);
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/smb1/AndXServerMessageBlock.java

                 */
    
                if (wordCount > 2) {
                    readParameterWordsWireFormat(buffer, bufferIndex + 4);
    
                    /* The SMB_COM_NT_CREATE_ANDX response wordCount is wrong. There's an
                     * extra 16 bytes for some "Offline Files (CSC or Client Side Caching)"
                     * junk. We need to bump up the wordCount here so that this method returns
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/spnego/NegTokenInitTest.java

            assertFalse(init.getContextFlag(NegTokenInit.CONFIDENTIALITY));
            assertEquals(NegTokenInit.INTEGRITY, init.getContextFlags());
        }
    
        @Test
        @DisplayName("Parse rejects wrong SPNEGO OID")
        void testParseRejectsWrongOid() throws Exception {
            byte[] token = buildInitToken(new ASN1ObjectIdentifier[] { OID_KRB }, 0, null, null, false, "1.2.840.113554.1.2.2", // Kerberos OID instead of SPNEGO OID
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb1/AndXServerMessageBlock.java

                 */
    
                if (this.wordCount > 2) {
                    readParameterWordsWireFormat(buffer, bufferIndex + 4);
    
                    /*
                     * The SMB_COM_NT_CREATE_ANDX response wordCount is wrong. There's an
                     * extra 16 bytes for some "Offline Files (CSC or Client Side Caching)"
                     * junk. We need to bump up the wordCount here so that this method returns
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbOperationExceptionTest.java

        @Test
        @DisplayName("Should handle context with null values")
        void testNullContext() {
            // When
            exception = new SmbOperationException(SmbOperationException.ErrorCode.UNKNOWN_ERROR, "Something went wrong", null, null, null);
    
            // Then
            assertNotNull(exception.getContext());
            assertTrue(exception.getContext().isEmpty());
    
            // Adding null context should be safe
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/pac/PacLogonInfoTest.java

            // Should validate string length
            String result = unicodeString.check(testString);
            assertEquals(testString, result);
    
            // Should reject wrong length
            assertThrows(PACDecodingException.class, () -> {
                unicodeString.check("WRONGLENGTH");
            });
        }
    
        @Test
        @DisplayName("Test empty arrays using mock")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
Back to top