Skip to Content
Java in a Nutshell, 5th Edition
book

Java in a Nutshell, 5th Edition

by David Flanagan
March 2005
Intermediate to advanced
1254 pages
104h 21m
English
O'Reilly Media, Inc.
Content preview from Java in a Nutshell, 5th Edition

Name

X500Principal

Synopsis

This class implements the java.security.Principal interface for entities represented by X.500 distinguished names (such as “CN=David,O=davidflanagan.com,C=US”). The constructor methods can accept the distinguished name in string form or in binary encoded form. getName( ) returns the name in string form, using the format defined by one of the three consant values. The no-argument version of getName( ) (the one defined by the Principal interface) returns the distinguished name formatted as specified by RFC 2253. Finally, getEncoded( ) returns a binary-encoded form of the name.

javax.security.auth.x500.X500Principal

Figure 19-28. javax.security.auth.x500.X500Principal

public final class X500Principal implements java.security.Principal, Serializable {
// Public Constructors
     public X500Principal(java.io.InputStream is);  
     public X500Principal(String name);  
     public X500Principal(byte[ ] name);  
// Public Constants
     public static final String CANONICAL;                               ="CANONICAL"
     public static final String RFC1779;                                 ="RFC1779"
     public static final String RFC2253;                                 ="RFC2253"
// Public Instance Methods
     public byte[ ] getEncoded( );  
     public String getName(String format);  
// Methods Implementing Principal
     public boolean equals(Object o);  
     public String getName( );  
     public int hashCode( );  
     public String toString( );  
}

Passed To

java.security.cert.TrustAnchor.TrustAnchor( ), java.security.cert.X509CertSelector.{setIssuer( ), setSubject( ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java in a Nutshell, 8th Edition

Java in a Nutshell, 8th Edition

Benjamin J. Evans, Jason Clark, David Flanagan
Java in a Nutshell, 7th Edition

Java in a Nutshell, 7th Edition

Benjamin J. Evans, David Flanagan
Learning Java, 5th Edition

Learning Java, 5th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck

Publisher Resources

ISBN: 0596007736Supplemental ContentErrata Page