Java Doc for GSSContextImpl.java in  » 6.0-JDK-Modules-sun » security » sun » security » jgss » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules sun » security » sun.security.jgss 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.security.jgss.GSSContextImpl

GSSContextImpl
class GSSContextImpl implements GSSContext(Code)
This class represents the JGSS security context and its associated operations. JGSS security contexts are established between peers using locally established credentials. Multiple contexts may exist simultaneously between a pair of peers, using the same or different set of credentials. The JGSS is independent of the underlying transport protocols and depends on its callers to transport the tokens between peers.

The context object can be thought of as having 3 implicit states: before it is established, during its context establishment, and after a fully established context exists.

Before the context establishment phase is initiated, the context initiator may request specific characteristics desired of the established context. These can be set using the set methods. After the context is established, the caller can check the actual characteristic and services offered by the context using the query methods.

The context establishment phase begins with the first call to the initSecContext method by the context initiator. During this phase the initSecContext and acceptSecContext methods will produce GSS-API authentication tokens which the calling application needs to send to its peer. The initSecContext and acceptSecContext methods may return a CONTINUE_NEEDED code which indicates that a token is needed from its peer in order to continue the context establishment phase. A return code of COMPLETE signals that the local end of the context is established. This may still require that a token be sent to the peer, depending if one is produced by GSS-API. The isEstablished method can also be used to determine if the local end of the context has been fully established. During the context establishment phase, the isProtReady method may be called to determine if the context can be used for the per-message operations. This allows implementation to use per-message operations on contexts which aren't fully established.

After the context has been established or the isProtReady method returns "true", the query routines can be invoked to determine the actual characteristics and services of the established context. The application can also start using the per-message methods of wrap and getMIC to obtain cryptographic operations on application supplied data.

When the context is no longer needed, the application should call dispose to release any system resources the context may be using.

RFC 2078
This class corresponds to the context level calls together with the per message calls of RFC 2078. The gss_init_sec_context and gss_accept_sec_context calls have been made simpler by only taking required parameters. The context can have its properties set before the first call to initSecContext. The supplementary status codes for the per-message operations are returned in an instance of the MessageProp class, which is used as an argument in these calls.



Constructor Summary
public  GSSContextImpl(GSSManagerImpl gssManager, GSSName peer, Oid mech, GSSCredential myCred, int lifetime)
     Creates a GSSContextImp on the context initiator's side.
public  GSSContextImpl(GSSManagerImpl gssManager, GSSCredential myCred)
     Creates a GSSContextImpl on the context acceptor's side.
public  GSSContextImpl(GSSManagerImpl gssManager, byte[] interProcessToken)
     Creates a GSSContextImpl out of a previously exported GSSContext.

Method Summary
public  byte[]acceptSecContext(byte inTok, int offset, int len)
    
public  voidacceptSecContext(InputStream inStream, OutputStream outStream)
    
public  voiddispose()
    
public  byte[]export()
    
public  booleangetAnonymityState()
    
public  booleangetConfState()
    
public  booleangetCredDelegState()
    
public  GSSCredentialgetDelegCred()
    
public  booleangetIntegState()
    
public  intgetLifetime()
    
public  byte[]getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp)
    
public  voidgetMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp)
    
public  OidgetMech()
    
public  booleangetMutualAuthState()
    
public  booleangetReplayDetState()
    
public  booleangetSequenceDetState()
    
public  GSSNamegetSrcName()
    
public  GSSNamegetTargName()
    
public  intgetWrapSizeLimit(int qop, boolean confReq, int maxTokenSize)
    
public  byte[]initSecContext(byte inputBuf, int offset, int len)
    
public  intinitSecContext(InputStream inStream, OutputStream outStream)
    
public  booleanisEstablished()
    
public  booleanisInitiator()
    
public  booleanisProtReady()
    
public  booleanisTransferable()
    
public  voidrequestAnonymity(boolean state)
    
public  voidrequestConf(boolean state)
    
public  voidrequestCredDeleg(boolean state)
    
public  voidrequestInteg(boolean state)
    
public  voidrequestLifetime(int lifetime)
    
public  voidrequestMutualAuth(boolean state)
    
public  voidrequestReplayDet(boolean state)
    
public  voidrequestSequenceDet(boolean state)
    
public  voidsetChannelBinding(ChannelBinding channelBindings)
    
public  byte[]unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp)
    
public  voidunwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
    
public  voidverifyMIC(byte[] inTok, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp)
    
public  voidverifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp)
    
public  byte[]wrap(byte inBuf, int offset, int len, MessageProp msgProp)
    
public  voidwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp)
    


Constructor Detail
GSSContextImpl
public GSSContextImpl(GSSManagerImpl gssManager, GSSName peer, Oid mech, GSSCredential myCred, int lifetime) throws GSSException(Code)
Creates a GSSContextImp on the context initiator's side.



GSSContextImpl
public GSSContextImpl(GSSManagerImpl gssManager, GSSCredential myCred) throws GSSException(Code)
Creates a GSSContextImpl on the context acceptor's side.



GSSContextImpl
public GSSContextImpl(GSSManagerImpl gssManager, byte[] interProcessToken) throws GSSException(Code)
Creates a GSSContextImpl out of a previously exported GSSContext.
See Also:   GSSContextImpl.isTransferable




Method Detail
acceptSecContext
public byte[] acceptSecContext(byte inTok, int offset, int len) throws GSSException(Code)



acceptSecContext
public void acceptSecContext(InputStream inStream, OutputStream outStream) throws GSSException(Code)



dispose
public void dispose() throws GSSException(Code)



export
public byte[] export() throws GSSException(Code)



getAnonymityState
public boolean getAnonymityState()(Code)



getConfState
public boolean getConfState()(Code)



getCredDelegState
public boolean getCredDelegState()(Code)



getDelegCred
public GSSCredential getDelegCred() throws GSSException(Code)



getIntegState
public boolean getIntegState()(Code)



getLifetime
public int getLifetime()(Code)



getMIC
public byte[] getMIC(byte[] inMsg, int offset, int len, MessageProp msgProp) throws GSSException(Code)



getMIC
public void getMIC(InputStream inStream, OutputStream outStream, MessageProp msgProp) throws GSSException(Code)



getMech
public Oid getMech() throws GSSException(Code)



getMutualAuthState
public boolean getMutualAuthState()(Code)



getReplayDetState
public boolean getReplayDetState()(Code)



getSequenceDetState
public boolean getSequenceDetState()(Code)



getSrcName
public GSSName getSrcName() throws GSSException(Code)



getTargName
public GSSName getTargName() throws GSSException(Code)



getWrapSizeLimit
public int getWrapSizeLimit(int qop, boolean confReq, int maxTokenSize) throws GSSException(Code)



initSecContext
public byte[] initSecContext(byte inputBuf, int offset, int len) throws GSSException(Code)



initSecContext
public int initSecContext(InputStream inStream, OutputStream outStream) throws GSSException(Code)



isEstablished
public boolean isEstablished()(Code)



isInitiator
public boolean isInitiator() throws GSSException(Code)



isProtReady
public boolean isProtReady()(Code)



isTransferable
public boolean isTransferable() throws GSSException(Code)



requestAnonymity
public void requestAnonymity(boolean state) throws GSSException(Code)



requestConf
public void requestConf(boolean state) throws GSSException(Code)



requestCredDeleg
public void requestCredDeleg(boolean state) throws GSSException(Code)



requestInteg
public void requestInteg(boolean state) throws GSSException(Code)



requestLifetime
public void requestLifetime(int lifetime) throws GSSException(Code)



requestMutualAuth
public void requestMutualAuth(boolean state) throws GSSException(Code)



requestReplayDet
public void requestReplayDet(boolean state) throws GSSException(Code)



requestSequenceDet
public void requestSequenceDet(boolean state) throws GSSException(Code)



setChannelBinding
public void setChannelBinding(ChannelBinding channelBindings) throws GSSException(Code)



unwrap
public byte[] unwrap(byte[] inBuf, int offset, int len, MessageProp msgProp) throws GSSException(Code)



unwrap
public void unwrap(InputStream inStream, OutputStream outStream, MessageProp msgProp) throws GSSException(Code)



verifyMIC
public void verifyMIC(byte[] inTok, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp) throws GSSException(Code)



verifyMIC
public void verifyMIC(InputStream tokStream, InputStream msgStream, MessageProp msgProp) throws GSSException(Code)



wrap
public byte[] wrap(byte inBuf, int offset, int len, MessageProp msgProp) throws GSSException(Code)



wrap
public void wrap(InputStream inStream, OutputStream outStream, MessageProp msgProp) throws GSSException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.