com.rsa.certj.cert.attributes

Class FriendlyName

java.lang.Object
  |
  +--com.rsa.certj.cert.attributes.X501Attribute
        |
        +--com.rsa.certj.cert.attributes.FriendlyName
All Implemented Interfaces:
Cloneable, Serializable

public class FriendlyName
extends X501Attribute
implements Cloneable, Serializable

This class holds, encodes, and decodes the friendly name attribute, which is defined in PKCS #9 v2. The friendly name attribute carries a user-friendly name of the object it belongs to. It allows users to assign nicknames.

The PKCS #12 v1.0 definition is as follows:

 
 friendlyName ATTRIBUTE ::= {
	WITH SYNTAX BMPString (SIZE(1..pkcs-9-ub-friendlyName))
	EQUALITY MATCHING RULE caseIgnoreMatch
	SINGLE VALUE TRUE
	ID pkcs-9-at-friendlyName
 }

 pkcs-9                  OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840)
                                                rsadsi(113549) pkcs(1) 9} 
 pkcs-9-at-friendlyName  OBJECT IDENTIFIER ::= {pkcs-9 20}
 pkcs-9-ub-friendlyName  INTEGER ::= 255

As indicated, friendlyName attributes must have a single value.

Copyright © RSA Security Inc., 1998-2001. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.cert.attributes.X501Attribute
CHALLENGE_PASSWORD, CONTENT_TYPE, COUNTRY_OF_CITIZENSHIP, COUNTRY_OF_RESIDENCE, CRS_DUAL_STATUS, CRS_FAILURE_INFO, CRS_MESSAGE_TYPE, CRS_PKI_STATUS, CRS_RECIPIENT_NONCE, CRS_SENDER_NONCE, CRS_TRANSACTION_ID, CRS_VERSION, DATE_OF_BIRTH, FRIENDLY_NAME, GENDER, LOCAL_KEY_ID, MESSAGE_DIGEST, NON_STANDARD, PLACE_OF_BIRTH, POSTAL_ADDRESS, PSEUDONYM, SIGNING_TIME, SMART_CSP, X509_V3_EXTENSION
 

Constructor Summary

FriendlyName()

Constructs an empty FriendlyName object.

FriendlyName(String name)

Constructs a FriendlyName object and initializes it with the value given.

 

Method Summary

 Object

clone()

Overrides the default clone method to get a deeper clone.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same FriendlyName, returns false otherwise.

 String

getFriendlyName()

Gets the value of this attribute, the friendly name.

 void

setFriendlyName(String theName)

Sets the value of this attribute, the friendly name, to theName.

 
Methods inherited from class com.rsa.certj.cert.attributes.X501Attribute
clearSensitiveData, compareOID, derEncodeAttributeLen, getAttributeType, getAttributeTypeString, getDEREncoding, getDERLen, getInstance, getNextBEROffset, getOID, isAttributeType
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FriendlyName

public FriendlyName()
Constructs an empty FriendlyName object.

FriendlyName

public FriendlyName(String name)
Constructs a FriendlyName object and initializes it with the value given.

Parameters

         name  

A user-friendly name of the object to which it belongs.

Method Detail

setFriendlyName

public void setFriendlyName(String theName)
Sets the value of this attribute, the friendly name, to theName.

Parameters

         theName  

The name to be stored.


getFriendlyName

public String getFriendlyName()
Gets the value of this attribute, the friendly name.

Returns

An instance of the String class that specifies the friendly name.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides the default clone method to get a deeper clone.

Overrides

clone in class X501Attribute

Returns

A new FriendlyName object, a copy of this object.

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same FriendlyName, returns false otherwise.

Overrides

equals in class Object

Parameters

         obj  

The instance of the FriendlyName object.

Returns

A boolean indicating whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000