|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.security.cert.CertPath
public abstract class CertPath
ºÒº¯ÀÎ ÀÎÁõ¼ ÀÇ ¼ø¼ (ÀÎÁõ¼ ÆÐ½º)ÀÔ´Ï´Ù.
À̰ÍÀº ¸ðµç CertPath¿¡ °øÅëµÈ ¸Þ¼µå¸¦ Á¤ÀÇÇÏ´Â abstract Ŭ·¡½ºÀÔ´Ï´Ù. ¼ºê Ŭ·¡½º¿¡¼´Â ´Ù¾çÇÑ Á¾·ùÀÇ ÀÎÁõ¼
(X. 509, PGP µî)À» ó¸®ÇÒ ¼ö ÀÖ½À´Ï´Ù.
¸ðµç CertPath¿¡´Â ŸÀÔ, Certificate
¸®½ºÆ®, Áö¿ø
µÇ´Â 1°³
ÀÌ»óÀÇ encode°¡ ÀÖ½À´Ï´Ù. CertPath Ŭ·¡½º´Â ºÒº¯À̱⠶§¹®¿¡
±¸Ãà ÈÄ¿¡ ¿ÜºÎ·ÎºÎÅÍ ´«¿¡ º¸ÀÌ´Â ÇüÅ·ΠCertPath¸¦ º¯°æÇÒ ¼ö ¾ø½À´Ï´Ù. ÀÌ Á¦ÇÑÀº ÀÌ Å¬·¡½ºÀÇ ¸ðµç public Çʵå¿Í ¸Þ¼µå, ±×¸®°í ¼ºê Ŭ·¡½º¿¡¼ Ãß°¡ ¶Ç´Â ¿À¹ö¶óÀ̵å(override) µÈ public Çʵå¿Í ¸Þ¼µå¿¡ µé¾î¸ÂÀ¾´Ï´Ù.
ŸÀÔÀº String·Î
ÀÎÁõ¼
ÆÐ½º·Î Certificate
ŸÀÔÀ» ƯÁ¤ÇÕ´Ï´Ù. ÀÎÁõ¼
ÆÐ½º certPath
°¢ ÀÎÁõ¼
cert¿¡
¼´Â cert.getType(). equals(certPath.getType())´Â true°¡ ¾Æ´Ï¸é ¾ÈµË´Ï´Ù.
Certificate
¸®½ºÆ®´Â 0 °³ ÀÌ»óÀÇ Certificate·Î
ºÎÅÍ µÇ´Â ¼ø¼ ÷ºÎÀÇ List ÀÔ´Ï´Ù. ÀÌ List¿Í
Æ÷ÇԵǴ Certificate´Â ºÒº¯ÀÏ Çʿ䰡 ÀÖ½À´Ï´Ù.
°¢°¢ÀÇ CertPath°´Ã¼´Â
´Ù¸¥ »ó´ë¿¡°Ô Æ÷ÇÔÇϰųª Àü¼ÛÇϰųª Çϱâ À§Çؼ ¹ÙÀÌÆ® ¹è¿·Î º¯È¯ÇÒ ¼ö ÀÖµµ·Ï, 1°³
ÀÌ»óÀÇ encode¸¦ Áö¿ø
Çϰí ÀÖÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. °¡´ÉÇÑ ÇÑ ±× encode´Â PKCS#7¿Í
°°ÀÌ ¸íÈ®ÇÏ°Ô ¹®¼È µÇ°í Àִ ǥÁØÀ¸·Î ÇÕ´Ï´Ù. CertPath·Î
Áö¿ø
µÇ°í ÀÖ´Â encode °¡¿îµ¥ 1°³¸¦, µðÆúÆ®ÀÇ encode·Î ÇÕ´Ï´Ù. encode¸¦ ¸í½ÃÀûÀ¸·Î ¿ä±¸ÇÏÁö ¾Ê´Â °æ¿ì (¿¹¸¦ µé¾î getEncoded() ¸Þ¼µå)¿¡
µðÆúÆ®ÀÇ encode°¡ »ç¿ëµË´Ï´Ù.
¸ðµç CertPath°´Ã¼´Â Serializable À̱⵵ ÇÕ´Ï´Ù. Á÷·ÄÈÁß¿¡ CertPath°´Ã¼´Â ´ëü CertPathRep °´Ã¼·Î ÇØ¼® 󸮵˴ϴÙ. À̰Ϳ¡ ÀÇÇØ
CertPath°´Ã¼´Â
±âº»ÀÌ µÇ´Â ±¸Çö¿¡ °ü°è¾øÀÌ µî°¡ÀΠǥÇö¿¡ Á÷·ÄÈ µË´Ï´Ù.
CertPath°´Ã¼´Â CertificateFactory·Î
ÀÛ¼ºµË´Ï´Ù¸¸, CertPathBuilder¿Í
°°Àº ´Ù¸¥ Ŭ·¡½º·ÎºÎÅÍ ¸®ÅϵÈ
Àϵµ ÀÖ½À´Ï´Ù.
±ÔÄ¢¿¡¼´Â X509Certificate·Î
±¸¼ºµÇ¾î ÀÖ´Â X. 509 CertPath´Â
Ÿ°Ù ÀÎÁõ¼
·Î ½ÃÀ۵Ǿî, Æ®·¯½ºÆ® ¿¨Ä¿°¡ ¹ßÇàÇÑ ÀÎÁõ¼
·Î ³¡³ªµµ·Ï
Á¤·Ä µÇ°í ÀÖ½À´Ï´Ù. Áï, ¾î´À ÀÎÁõ¼
ÀÇ ¹ßÇàÀÚ´Â ´ÙÀ½ÀÇ ÀÎÁõ¼
ÀÇ ÇÇÀÎÁõÀÚ°¡ µË´Ï´Ù. TrustAnchor¸¦
³ªÅ¸³»´Â ÀÎÁõ¼´Â ÀÎÁõ¼
ÆÐ½º¿¡ Æ÷ÇÔµÇÁö ¾Ê½À´Ï´Ù. ¹Ì°Ë»çÀÇ X. 509 CertPath´Â ÀÌ ±ÔÄ¢¿¡ µû¸£Áö ¾Ê½À´Ï´Ù. ÀÎÁõ¼
ÆÐ½º°¡ ¹«È¿°¡ µÇ´Â ¿øÀÎÀÌ µÇ´Â ÀÌ ±ÔÄ¢À¸·ÎºÎÅÍÀÇ ÀÏÅ»À» PKIX CertPathValidator´Â °ËÃâÇØ, CertPathValidatorExceptionÀ»
Throw ÇÕ´Ï´Ù.
º´Çà ¾×¼¼½º
¸ðµç CertPath°´Ã¼´Â
thread¿¡ ´ëÇØ¼ ¾ÈÀüÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. Áï, ÀÌ Å¬·¡½º¿¡¼ Á¤ÀÇµÈ ¸Þ¼µå´Â ¾Ç¿µÇâÀ» ÁÖ´Â ÀÏ ¾øÀÌ, º¹¼ö thread°¡ º´ÇàÇØ ´ÜÀÏ CertPath °´Ã¼ (¶Ç´Â 1°³
ÀÌ»ó) »ó¿¡¼ È£ÃâÇÒ ¼ö ÀÖ½À´Ï´Ù
. À̰ÍÀº CertPath.getCertificates°¡ µ¹·ÁÁÖ´Â List¿¡ ´ëÇØ¼µµ µé¾î¸ÂÀ¾´Ï´Ù.
CertPath°´Ã¼´Â ºÒº¯À¸·Î ÇÑÆí thread¿¡ ´ëÇØ¼ ¾ÈÀüÇÏÁö ¾ÊÀ¸¸é ¾È µÇ±â ¶§¹®¿¡
¾×¼¼½ºÀÇ µ¿±âÀÇ °ÆÁ¤À» ÇÏ´Â ÀÏ ¾øÀÌ, ´Ù¾çÇÑ Äڵ忡 ÀÌ °´Ã¼¸¦ °Ç³×ÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù.
CertificateFactory,
CertPathBuilder,
Á÷·ÄÈ µÈ Çü½Ä | Áßø(Nested) Ŭ·¡½º °³¿ä | |
|---|---|
protected static class |
CertPath.CertPathRep
Á÷·ÄÈÀÇ ´ëü CertPath Ŭ·¡½ºÀÔ´Ï´Ù. |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
protected |
CertPath (String type)
ÁöÁ¤µÈ ŸÀÔÀÇ CertPath¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
| ¸Þ¼µå °³¿ä | |
|---|---|
boolean |
equals (Object other)
ÁöÁ¤µÈ °´Ã¼¿Í ÀÌ ÀÎÁõ¼ ÆÐ½º°¡ µ¿ÀÏÇÑÁö ¾î¶²Áö¸¦ ºñ±³ÇÕ´Ï´Ù. |
abstract List <? extends Certificate > |
getCertificates ()
ÀÌ ÀÎÁõ¼ ÆÐ½º³»ÀÇ ÀÎÁõ¼ ÀÇ ¸®½ºÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
abstract byte[] |
getEncoded ()
µðÆúÆ®ÀÇ encode¸¦ »ç¿ëÇØ, ÀÌ ÀÎÁõ¼ ÆÐ½ºÀÇ encode µÈ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. |
abstract byte[] |
getEncoded (String encoding)
ÁöÁ¤ÇÑ encode¸¦ »ç¿ëÇØ, ÀÌ ÀÎÁõ¼ ÆÐ½ºÀÇ encode µÈ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù. |
abstract Iterator <String > |
getEncodings ()
ÀÌ ÀÎÁõ¼ ÆÐ½º·Î Áö¿øÇÏ´Â encodeÀÇ ¹Ýº¹À» ¸®ÅÏÇÕ´Ï´Ù. |
String |
getType ()
ÀÌ ÀÎÁõ¼ ÆÐ½º³»ÀÇ Certificate
ŸÀÔÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
hashCode ()
ÀÌ ÀÎÁõ¼ ÆÐ½ºÀÇ ÇØ½Ã Äڵ带 ¸®ÅÏÇÕ´Ï´Ù. |
String |
toString ()
ÀÌ ÀÎÁõ¼ ÆÐ½ºÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöÀ» ¸®ÅÏÇÕ´Ï´Ù. |
protected Object |
writeReplace ()
Á÷·ÄÈ µÇ´Â CertPath¸¦ CertPathRep °´Ã¼¿¡ ¿Å°Ü³õ½À´Ï´Ù. |
| Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| »ý¼ºÀÚ »ó¼¼ |
|---|
protected CertPath(String type)
CertPath¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
´ëºÎºÐÀÇ »ç¿ëÀÚ´Â CertificateFactory¸¦ »ç¿ëÇØ CertPath¸¦ ÀÛ¼ºÇϱâ À§ÇØ, ÀÌ »ý¼ºÀÚ´Â º¸È£µÇ°í ÀÖ½À´Ï´Ù.
type - ÀÌ ÆÐ½º³»ÀÇ Certificate
ŸÀÔÀÇ Ç¥Áظí| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public String getType()
Certificate
ŸÀÔÀ» ¸®ÅÏÇÕ´Ï´Ù. À̰ÍÀº ÀÎÁõ¼
ÆÐ½º³»ÀÇ ¸ðµç Certificate¿¡ ´ëÇÑ cert.getType() ·Î ¸®ÅϵÈ
ij¸¯ÅÍ ¶óÀΰú °°½À´Ï´Ù.
Certificate
ŸÀÔ (nullÀº µÇÁö ¾Ê´Â´Ù)public abstract Iterator <String > getEncodings()
Iterator¸¦ remove ¸Þ¼µå·Î º¯°æÇÏ·Á°í Çϸé, UnsupportedOperationException°¡ ¹ß»ý µË´Ï´Ù.
Iteratorpublic boolean equals(Object other)
CertPath
ŸÀÔÀÌ µ¿ÀÏÇϰí, ÀÎÁõ¼
ÀÇ ListÀÌ (Áï List ³»ÀÇ Certificate°¡ ¾Ï¹¬ÀûÀ¸·Î) µ¿ÀÏÇÑ °æ¿ì, ÀÌ·¯ÇÑ CertPath´Â µ¿ÀÏÇÏ°Ô µË´Ï´Ù. CertPath´Â CertPath°¡ ¾Æ´Ñ °´Ã¼¿Í µ¿ÀÏÇØÁú °ÍÀº ¾ø½À´Ï´Ù.
ÀÌ ¾Ë°í¸®ÁòÀº ÀÌ ¸Þ¼µå¿¡ ±¸ÇöµÇ°í ÀÖ½À´Ï´Ù. ¿À¹ö¶óÀ̵å(override) ÇÒ ¶§´Â ¿©±â¼ ¼³¸íÇÑ µ¿ÀÛÀÌ À¯ÁöµÇµµ·Ï ÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.
Object ³»ÀÇ equals other - ÀÌ ÀÎÁõ¼
ÆÐ½º¿Í µ¿ÀÏÇÑÁö ¾î¶²Áö°¡ ÆÇÁ¤µÇ´Â °´Ã¼
Object.hashCode(),
Hashtable public int hashCode()
hashCode = path.getType(). hashCode();
hashCode = 31*hashCode + path.getCertificates(). hashCode();
À̰Ϳ¡ ÀÇÇØ
Object.hashCode
ÀÏ¹Ý ±Ô¾à¿¡ ÀÇÇØ ¿ä±¸µÇµµ·Ï, ÀÓÀÇÀÇ 2°³ÀÇ ÀÎÁõ¼
ÆÐ½º path1¿Í
path2·Î
path1.equals(path2) À̸é path1.hashCode() ==path2.hashCode()°¡ µÇ´Â °ÍÀÌ º¸ÁõµË´Ï´Ù.
Object ³»ÀÇ hashCode Object.equals(java.lang.Object),
Hashtable public String toString()
Certificate·Î
toString ¸Þ¼µå¸¦ È£ÃâÇÕ´Ï´Ù.
Object ³»ÀÇ toString
public abstract byte[] getEncoded()
throws CertificateEncodingException
CertificateEncodingException - encode ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
public abstract byte[] getEncoded(String encoding)
throws CertificateEncodingException
encoding - »ç¿ëÇÏ´Â encode¸í
CertificateEncodingException - encodeÀÇ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì, ȤÀº ÁöÁ¤ÇÑ encode°¡ Áö¿ø
µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ìpublic abstract List <? extends Certificate > getCertificates()
List´Â ºÒº¯À¸·Î thread¿¡ ´ëÇØ¼ ¾ÈÀüÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.
Certificate
ºÒº¯ÀÎ List (ºó ¸®½ºÆ®´Â °¡´É, nullÀº ºÒ°¡)
protected Object writeReplace()
throws ObjectStreamException
CertPath¸¦ CertPathRep °´Ã¼¿¡ ¿Å°Ü³õ½À´Ï´Ù.
CertPathRep
ObjectStreamException - ÀÌ ÀÎÁõ¼
ÆÐ½º¸¦ ³ªÅ¸³»´Â CertPathRep¸¦ »ý¼ºÇÒ ¼ö ¾ø¾ú´ø °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.