Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 13 for getSessionKey (0.19 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. src/main/java/jcifs/smb/SmbPipeHandleImpl.java

        /**
         *
         * {@inheritDoc}
         *
         * @see jcifs.smb.SmbPipeHandleInternal#getSessionKey()
         */
        @Override
        public byte[] getSessionKey() throws CIFSException {
            try (SmbTreeHandleImpl th = ensureTreeConnected(); SmbSessionImpl sess = th.getSession()) {
                return sess.getSessionKey();
            }
        }
    
        /**
         * {@inheritDoc}
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 10.2K bytes
    - Click Count (0)
  2. src/main/java/jcifs/smb/AuthenticationProvider.java

        /**
         * Gets the session key after successful authentication
         *
         * @return the session key or null if not available
         */
        byte[] getSessionKey();
    
        /**
         * Gets the signing key for SMB2/3
         *
         * @return the signing key or null if not available
         */
        byte[] getSigningKey();
    
        /**
         * Validates authentication credentials
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 3.9K bytes
    - Click Count (1)
  3. src/main/java/jcifs/smb/SmbSessionInternal.java

        /**
         * Returns the current session key used for signing and encryption.
         *
         * @return the current session key
         * @throws CIFSException if the session key cannot be retrieved
         */
        byte[] getSessionKey() throws CIFSException;
    
        /**
         * Returns the SMB transport associated with this session.
         *
         * @return the transport for this session
         */
        SmbTransport getTransport();
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  4. src/test/java/jcifs/smb/SmbSessionImplTest.java

            assertTrue(session.isInUse());
        }
    
        @Test
        @DisplayName("getSessionKey: throws when absent, returns when present")
        void testGetSessionKey() throws Exception {
            SmbSessionImpl session = newSession();
    
            // Absent key -> CIFSException
            CIFSException noKey = assertThrows(CIFSException.class, session::getSessionKey);
            assertTrue(noKey.getMessage().contains("No session key"));
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 12.5K bytes
    - Click Count (0)
  5. src/main/java/jcifs/dcerpc/DcerpcPipeHandle.java

        }
    
        @Override
        public String getServerWithDfs() {
            return this.pipe.getLocator().getServerWithDfs();
        }
    
        @Override
        public byte[] getSessionKey() throws CIFSException {
            return this.handle.getSessionKey();
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.dcerpc.DcerpcHandle#doSendReceiveFragment(byte[], int, int, byte[])
         */
        @Override
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 5.6K bytes
    - Click Count (0)
  6. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

                DcerpcPipeHandle handle = createMockedDcerpcPipeHandle();
                byte[] expectedKey = "sessionKey".getBytes();
                when(mockSmbPipeHandleInternal.getSessionKey()).thenReturn(expectedKey);
                assertArrayEquals(expectedKey, handle.getSessionKey());
            }
    
            @Test
            @DisplayName("Should propagate CIFSException when getting session key")
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 21K bytes
    - Click Count (0)
  7. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            // After close, report stale
            handle.close();
            assertTrue(handle.isStale(), "Closed handle reports stale");
        }
    
        @Test
        @DisplayName("getSessionKey propagates CIFSException from session acquisition")
        void getSessionKey_exception_propagates() throws Exception {
            SmbPipeHandleImpl handle = newHandleWithBasicStubs(0, "\\\\pipe\\\\sess");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 16.7K bytes
    - Click Count (0)
  8. src/main/java/jcifs/internal/smb2/multichannel/ChannelManager.java

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
    
            try {
                // Combine session key with channel-specific data
                byte[] sessionKey = getSessionKey();
                if (sessionKey != null) {
                    baos.write(sessionKey);
                }
                baos.write(channel.getLocalInterface().getAddress().getAddress());
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 21 11:13:46 GMT 2025
    - 20K bytes
    - Click Count (0)
  9. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

                return serverWithDfs;
            }
    
            @Override
            public CIFSContext getTransportContext() {
                return localTransportContext;
            }
    
            @Override
            public byte[] getSessionKey() throws CIFSException {
                return sessionKey;
            }
    
            @Override
            protected void doSendFragment(byte[] buf, int off, int length) throws IOException {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 15.3K bytes
    - Click Count (0)
  10. src/main/java/jcifs/util/SecureKeyManager.java

        }
    
        /**
         * Retrieve a session key
         *
         * @param sessionId unique session identifier
         * @return the secret key, or null if not found
         */
        public SecretKey getSessionKey(String sessionId) {
            checkNotClosed();
    
            SecretKey key = sessionKeys.get(sessionId);
    
            // Try to load from KeyStore if not in memory
            if (key == null && keyStore != null) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 21.5K bytes
    - Click Count (0)
Back to Top