JavaTM 2 Platform
Standard Ed. 5.0

java.security.cert
Ŭ·¡½º CertPath

java.lang.Object 
  »óÀ§¸¦ È®Àå java.security.cert.CertPath
¸ðµç ±¸ÇöµÈ ÀÎÅÍÆäÀ̽º:
Serializable

public abstract class CertPath
extends Object
implements Serializable

ºÒº¯ÀÎ ÀÎÁõ¼­ ÀÇ ¼ø¼­ (ÀÎÁõ¼­ Æнº)ÀÔ´Ï´Ù.

ÀÌ°ÍÀº ¸ðµç 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¿¡ ´ëÇؼ­ ¾ÈÀüÇÏÁö ¾ÊÀ¸¸é ¾È µÇ±â ¶§¹®¿¡ ¾×¼¼½ºÀÇ µ¿±âÀÇ °ÆÁ¤À» ÇÏ´Â ÀÏ ¾øÀÌ, ´Ù¾çÇÑ Äڵ忡 ÀÌ °´Ã¼¸¦ °Ç³×ÁÙ ¼ö°¡ ÀÖ½À´Ï´Ù.

µµÀÔµÈ ¹öÀü :
1.4
°ü·Ã Ç׸ñ:
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
 

»ý¼ºÀÚ »ó¼¼

CertPath

protected CertPath(String  type)
ÁöÁ¤µÈ ŸÀÔÀÇ CertPath¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

´ëºÎºÐÀÇ »ç¿ëÀÚ´Â CertificateFactory¸¦ »ç¿ëÇØ CertPath¸¦ ÀÛ¼ºÇϱâ À§ÇØ, ÀÌ »ý¼ºÀÚ´Â º¸È£µÇ°í ÀÖ½À´Ï´Ù.

ÆĶó¹ÌÅÍ:
type - ÀÌ Æнº³»ÀÇ Certificate ŸÀÔÀÇ Ç¥Áظí
¸Þ¼­µåÀÇ »ó¼¼

getType

public String  getType()
ÀÌ ÀÎÁõ¼­ Æнº³»ÀÇ Certificate ŸÀÔÀ» ¸®ÅÏÇÕ´Ï´Ù. ÀÌ°ÍÀº ÀÎÁõ¼­ Æнº³»ÀÇ ¸ðµç Certificate¿¡ ´ëÇÑ cert.getType() ·Î ¸®ÅÏµÈ Ä³¸¯ÅÍ ¶óÀΰú °°½À´Ï´Ù.

¹Ýȯ°ª:
ÀÌ ÀÎÁõ¼­ Æнº³»ÀÇ Certificate ŸÀÔ (nullÀº µÇÁö ¾Ê´Â´Ù)

getEncodings

public abstract Iterator <String > getEncodings()
ÀÌ ÀÎÁõ¼­ Æнº·Î Áö¿øÇÏ´Â encodeÀÇ ¹Ýº¹À» ¸®ÅÏÇÕ´Ï´Ù. ¹Ýº¹ÀÇ Ã³À½Àº µðÆúÆ®ÀÇ encode°¡ µË´Ï´Ù. ¸®ÅÏµÈ Iterator¸¦ remove ¸Þ¼­µå·Î º¯°æÇÏ·Á°í Çϸé, UnsupportedOperationException°¡ ¹ß»ý µË´Ï´Ù.

¹Ýȯ°ª:
Áö¿ø µÇ´Â encode (String ·Î¼­)ÀÇ À̸§¿¡ ´ëÇÑ Iterator

equals

public boolean equals(Object  other)
ÁöÁ¤µÈ °´Ã¼¿Í ÀÌ ÀÎÁõ¼­ Æнº°¡ µ¿ÀÏÇÑÁö ¾î¶²Áö¸¦ ºñ±³ÇÕ´Ï´Ù. 2°³ÀÇ CertPath ŸÀÔÀÌ µ¿ÀÏÇÏ°í, ÀÎÁõ¼­ ÀÇ ListÀÌ (Áï List ³»ÀÇ Certificate°¡ ¾Ï¹¬ÀûÀ¸·Î) µ¿ÀÏÇÑ °æ¿ì, ÀÌ·¯ÇÑ CertPath´Â µ¿ÀÏÇÏ°Ô µË´Ï´Ù. CertPath´Â CertPath°¡ ¾Æ´Ñ °´Ã¼¿Í µ¿ÀÏÇØÁú °ÍÀº ¾ø½À´Ï´Ù.

ÀÌ ¾Ë°í¸®ÁòÀº ÀÌ ¸Þ¼­µå¿¡ ±¸ÇöµÇ°í ÀÖ½À´Ï´Ù. ¿À¹ö¶óÀ̵å(override) ÇÒ ¶§´Â ¿©±â¼­ ¼³¸íÇÑ µ¿ÀÛÀÌ À¯ÁöµÇµµ·Ï ÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ equals
ÆĶó¹ÌÅÍ:
other - ÀÌ ÀÎÁõ¼­ Æнº¿Í µ¿ÀÏÇÑÁö ¾î¶²Áö°¡ ÆÇÁ¤µÇ´Â °´Ã¼
¹Ýȯ°ª:
ÁöÁ¤ÇÑ °´Ã¼°¡ ÀÌ ÀÎÁõ¼­ Æнº¿¡ µ¿ÀÏÇÑ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false
°ü·Ã Ç׸ñ:
Object.hashCode(), Hashtable

hashCode

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()°¡ µÇ´Â °ÍÀÌ º¸ÁõµË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ hashCode
¹Ýȯ°ª:
ÀÌ ÀÎÁõ¼­ Æнº¿¡ À־ÀÇ Çؽà Äڵ尪
°ü·Ã Ç׸ñ:
Object.equals(java.lang.Object), Hashtable

toString

public String  toString()
ÀÌ ÀÎÁõ¼­ ÆнºÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöÀ» ¸®ÅÏÇÕ´Ï´Ù. ÆнºÀÇ °¢ Certificate·Î toString ¸Þ¼­µå¸¦ È£ÃâÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º Object ³»ÀÇ toString
¹Ýȯ°ª:
ÀÌ ÀÎÁõ¼­ ÆнºÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇö

getEncoded

public abstract byte[] getEncoded()
                           throws CertificateEncodingException 
µðÆúÆ®ÀÇ encode¸¦ »ç¿ëÇØ, ÀÌ ÀÎÁõ¼­ ÆнºÀÇ encode µÈ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
encode µÈ ¹ÙÀÌÆ®
¿¹¿Ü:
CertificateEncodingException - encode ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

getEncoded

public abstract byte[] getEncoded(String  encoding)
                           throws CertificateEncodingException 
ÁöÁ¤ÇÑ encode¸¦ »ç¿ëÇØ, ÀÌ ÀÎÁõ¼­ ÆнºÀÇ encode µÈ Çü½ÄÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
encoding - »ç¿ëÇÏ´Â encode¸í
¹Ýȯ°ª:
encode µÈ ¹ÙÀÌÆ®
¿¹¿Ü:
CertificateEncodingException - encodeÀÇ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì, ȤÀº ÁöÁ¤ÇÑ encode°¡ Áö¿ø µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì

getCertificates

public abstract List <?  extends Certificate > getCertificates()
ÀÌ ÀÎÁõ¼­ Æнº³»ÀÇ ÀÎÁõ¼­ ÀÇ ¸®½ºÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. ¸®ÅÏµÈ List´Â ºÒº¯À¸·Î thread¿¡ ´ëÇؼ­ ¾ÈÀüÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.

¹Ýȯ°ª:
Certificate ºÒº¯ÀÎ List (ºó ¸®½ºÆ®´Â °¡´É, nullÀº ºÒ°¡)

writeReplace

protected Object  writeReplace()
                       throws ObjectStreamException 
Á÷·ÄÈ­ µÇ´Â CertPath¸¦ CertPathRep °´Ã¼¿¡ ¿Å°Ü³õ½À´Ï´Ù.

¹Ýȯ°ª:
Á÷·ÄÈ­ µÇ´Â CertPathRep
¿¹¿Ü:
ObjectStreamException - ÀÌ ÀÎÁõ¼­ Æнº¸¦ ³ªÅ¸³»´Â CertPathRep¸¦ »ý¼ºÇÒ ¼ö ¾ø¾ú´ø °æ¿ì

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.