- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for initSecContext (1.71 sec)
-
src/test/java/jcifs/smb/SSPContextTest.java
assertThrows(CIFSException.class, () -> ctx.initSecContext(buf, 3, 1)); assertThrows(CIFSException.class, () -> ctx.initSecContext(buf, 2, 2)); } @Test @DisplayName("initSecContext null token edge cases") void testInitSecContextNullToken() throws Exception { DummySSPContext ctx = new DummySSPContext(new byte[] { 1 }, false, null, null, 0, false);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.2K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/NtlmContextTest.java
// Test that calling initSecContext in an invalid state throws an exception when(mockAuth.getDomain()).thenReturn(domain); when(mockAuth.getUsername()).thenReturn(username); when(mockAuth.getPassword()).thenReturn(password); NtlmContext context = new NtlmContext(mockAuth, true); context.initSecContext(new byte[0], 0, 0); // state -> 2
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SpnegoContextTest.java
CIFSException ex = assertThrows(CIFSException.class, () -> ctx.initSecContext(new byte[] { firstByte }, 0, 1)); assertEquals("Invalid token", ex.getMessage()); // Ensure mechContext was not engaged due to early failure verify(this.mechContext, never()).initSecContext(any(), anyInt(), anyInt()); } @Test @DisplayName("initSecContext with null buffer and non-zero len throws NPE")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/Kerb5ContextTest.java
} @Test @DisplayName("initSecContext wraps GSSException into SmbAuthException") void initSecContext_failure_wraps() throws Exception { when(gssContext.initSecContext(any(), anyInt(), anyInt())).thenThrow(new GSSException(GSSException.DEFECTIVE_TOKEN)); assertThrows(SmbAuthException.class, () -> ctx.initSecContext(new byte[] {}, 0, 0)); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 14.2K bytes - Viewed (0) -
src/main/java/jcifs/smb/SpnegoContext.java
* Initialize the GSSContext to provide SPNEGO feature. * * @param inputBuf * @param offset * @param len * @return response token */ @Override public byte[] initSecContext(final byte[] inputBuf, final int offset, final int len) throws CIFSException { SpnegoToken resp; if (this.completed) { throw new CIFSException("Already complete"); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 14.5K bytes - Viewed (0) -
src/main/java/jcifs/smb/SSPContext.java
* @param len length of token data * @return result token * @throws SmbException if an SMB protocol error occurs * @throws CIFSException if a general CIFS error occurs */ byte[] initSecContext(byte[] token, int off, int len) throws CIFSException; /** * Gets the NetBIOS name of the remote endpoint. * @return the name of the remote endpoint */ String getNetbiosName(); /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 3.9K bytes - Viewed (0) -
src/main/java/jcifs/smb/Kerb5Context.java
} throw new SmbException("ExtendedGSSContext is not implemented by GSSContext"); } @Override public byte[] initSecContext(byte[] token, int off, int len) throws SmbException { try { return this.gssContext.initSecContext(token, off, len); } catch (GSSException e) { throw new SmbAuthException("GSSAPI mechanism failed", e); } }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 13.5K bytes - Viewed (1) -
src/main/java/jcifs/smb1/smb1/NtlmContext.java
* @param len length of token data * @return the output token bytes * @throws SmbException if an error occurs during context initialization */ public byte[] initSecContext(byte[] token, final int offset, final int len) throws SmbException { switch (state) { case 1: final Type1Message msg1 = new Type1Message(ntlmsspFlags, auth.getDomain(), workstation);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 7K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbSessionImpl.java
if (s != null) { try { return Subject.doAs(s, (PrivilegedExceptionAction<byte[]>) () -> ctx.initSecContext(token, 0, token == null ? 0 : token.length)); } catch (PrivilegedActionException e) { if (e.getException() instanceof SmbException) { throw (SmbException) e.getException();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 68.9K bytes - Viewed (0) -
src/main/java/jcifs/smb/NtlmContext.java
* @param targetName * the target's SPN */ public void setTargetName(final String targetName) { this.targetName = targetName; } @Override public byte[] initSecContext(final byte[] token, final int offset, final int len) throws SmbException { return switch (this.state) { case 1 -> makeNegotiate(token); case 2 -> makeAuthenticate(token);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 17.3K bytes - Viewed (0)