Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for wrong (0.98 sec)

  1. src/test/java/jcifs/pac/kerberos/KerberosApRequestTest.java

            // Arrange: Build sequence with invalid version and otherwise valid tags
            ASN1EncodableVector v = new ASN1EncodableVector();
            v.add(new DERTaggedObject(true, 0, new ASN1Integer(badPvno))); // wrong pvno
            v.add(new DERTaggedObject(true, 1, new ASN1Integer(Integer.parseInt(KerberosConstants.KERBEROS_AP_REQ))));
            v.add(new DERTaggedObject(true, 2, new DERBitString(new byte[] { 0x00 })));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/ServerMessageBlock2RequestTest.java

                IllegalStateException exception = assertThrows(IllegalStateException.class, () -> {
                    testRequest.encode(buffer, 0);
                });
    
                assertTrue(exception.getMessage().contains("Wrong size calculation"));
            }
        }
    
        // Test implementation classes
        private static class TestServerMessageBlock2Request extends ServerMessageBlock2Request<TestServerMessageBlock2Response> {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.7K 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