public long getCreationTime() { return unwrap().getCreationTime(); }
@Override public long getCreationTime() { return unwrap().getCreationTime(); }
@Override public long getCreationTime() { return delegate().getCreationTime(); }
public long getCreationTime() { return unwrap().getCreationTime(); }
@Override public long getCreationTime() { return unwrap().getCreationTime(); }
@Override public long getCreationTime() { return unwrap().getCreationTime(); }
public long getCreationTime() { return unwrap().getCreationTime(); }
@Override public SslSession getSession(SSLEngine engine) throws SSLException { SSLSession session = engine.getSession(); String cipher = session.getCipherSuite(); long establishedTime = session.getCreationTime(); X509Certificate peerCert = null; try { X509Certificate[] certs = session.getPeerCertificateChain(); if (certs.length > 0) { peerCert = certs[0]; } } catch (SSLPeerUnverifiedException e) { // The peer might not have presented a certificate, in which case we consider them // to be an unauthenticated peer. } String version = session.getProtocol(); return new SslSession(null, null, version, cipher, establishedTime, peerCert); } }
public GlobusTLSContext(SSLSession sslSession) { containerSubject = new Subject(); containerSubject.getPrincipals().add(sslSession.getLocalPrincipal()); containerSubject.getPublicCredentials().add( getLocalCertChain(sslSession)); GlobusTLSContext.containerSubjectHolder.set(containerSubject); peerSubject = new Subject(); try { peerSubject.getPrincipals().add(sslSession.getPeerPrincipal()); } catch (SSLPeerUnverifiedException e) { // We should already be verified, but if by some crazy chance we // aren't logger.warn(e.getLocalizedMessage(), e); } peerSubject.getPublicCredentials().add(getPeerCertChain(sslSession)); creationTime = new Date(sslSession.getCreationTime()); try { sessionId = new String(Hex.encodeHex(sslSession.getId())); } catch (Exception e) { logger.warn(e.getLocalizedMessage(), e); } cipherSuite = sslSession.getCipherSuite(); protocol = sslSession.getProtocol(); peerHost = sslSession.getPeerHost(); peerPort = sslSession.getPeerPort(); }
LOG.log(Level.FINEST, " Session created in " + ss.getCreationTime()); LOG.log(Level.FINEST, " Session accessed in " + ss.getLastAccessedTime()); LOG.log(Level.FINEST, " Cipher suite = " + ss.getCipherSuite());
LOG.log(Level.FINEST, " Session created in " + ss.getCreationTime()); LOG.log(Level.FINEST, " Session accessed in " + ss.getLastAccessedTime()); LOG.log(Level.FINEST, " Cipher suite = " + ss.getCipherSuite());
logger.finer("Protocol is " + session.getProtocol()); logger.finer("ID is " + new BigInteger(session.getId())); logger.finer("Session created in " + session.getCreationTime()); logger.finer("Session accessed in " + session.getLastAccessedTime()); } catch (Exception e) {
logger.finer("Protocol is " + session.getProtocol()); logger.finer("ID is " + new BigInteger(session.getId())); logger.finer("Session created in " + session.getCreationTime()); logger.finer("Session accessed in " + session.getLastAccessedTime()); } catch (Exception e) {
resourceRegistration.registerReadOnlyAttribute(CIPHER_SUITE, new SSLSessionRuntimeHandler((ModelNode r, SSLSession s) -> r.set(s.getCipherSuite()))); resourceRegistration.registerReadOnlyAttribute(CREATION_TIME, new SSLSessionRuntimeHandler( (ModelNode r, SSLSession s) -> r.set(new SimpleDateFormat(ISO_8601_FORMAT).format(new Date(s.getCreationTime()))))); resourceRegistration.registerReadOnlyAttribute(LAST_ACCESSED_TIME, new SSLSessionRuntimeHandler( (ModelNode r, SSLSession s) -> r.set(new SimpleDateFormat(ISO_8601_FORMAT).format(new Date(s.getLastAccessedTime())))));