|
JCaosLib V1.4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dreamsecurity.jcaos.cms.SignedData
¼¸í ¸Þ½ÃÁö(SignedData)¸¦ ó¸®Çϱâ À§ÇÑ Å¬·¡½ºÀÌ´Ù.
¼¸í ¸Þ½ÃÁö´Â ¼¸íÀÚÀÇ °³ÀÎ۸¦ ÀÌ¿ëÇÏ¿© ¼¸í°ªÀ» »ý¼ºÇÔÀ¸·Î¼ ¸Þ½ÃÁöÀÇ
ÀÎÁõ°ú ¹«°á¼ºÀ» Á¦°øÇÏ´Â º¸¾È ¸Þ½ÃÁö Çü½ÄÀÌ´Ù.
ÇØ´ç Ŭ·¡½º¿¡¼´Â RFC3852¿¡¼ Á¤ÀÇÇÏ´Â SignedData¿Í PKCS#7¿¡¼ Á¤ÀÇÇÏ´Â SignedData¸¦ ¸ðµÎ Áö¿øÇÑ´Ù.
¼¸í ¸Þ½ÃÁö¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ Á¤º¸´Â "RFC3852" ¶Ç´Â
"PKCS#7"¿¡¼ È®ÀÎÇÒ ¼ö ÀÖ´Ù.
¼¸í ¸Þ½ÃÁöÀÇ ASN.1 Æ÷¸ËÀº ´ÙÀ½°ú °°´Ù.
RFC3852¿¡¼ Á¤ÀÇÇÏ´Â SignedData Çü½Ä : SignedData ::= SEQUENCE { version CMSVersion, digestAlgorithms DigestAlgorithmIdentifiers, encapContentInfo EncapsulatedContentInfo, certificates [0] IMPLICIT CertificateSet OPTIONAL, crls [1] IMPLICIT RevocationInfoChoices OPTIONAL, signerInfos SignerInfos } PKCS#7¿¡¼ Á¤ÀÇÇÏ´Â SignedData Çü½Ä : SignedData ::= SEQUENCE { version Version, digestAlgorithms DigestAlgorithmIdentifiers, contentInfo ContentInfo, certificates [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL, crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, signerInfos SignerInfos } ¼¸í ¸Þ½ÃÁö °´Ã¼ »ý¼º ¿¹Á¦ : byte[] signData = <¼¸í ¸Þ½ÃÁö Àбâ> SignedData signedData = SignedData.getInstance(signData);
Method Summary | |
void |
addSignerCerts(X509Certificate cert)
¼¸í ¸Þ½ÃÁö¾È¿¡ ¼¸íÀÚÀÇ ÀÎÁõ¼°¡ Æ÷ÇԵǾîÀÖÁö ¾ÊÀº °æ¿ì¿¡ ¼¸í °ª °ËÁõÀ» À§Çؼ ÇÊ¿äÇÑ ¼¸íÀÚÀÇ ÀÎÁõ¼¸¦ ÁöÁ¤ÇÑ´Ù. |
java.util.ArrayList |
getCertificates()
¼¸í ¸Þ½ÃÁö¿¡ Æ÷ÇԵǾîÀÖ´Â ÀÎÁõ¼ ¸ñ·ÏÀ» ȹµæÇÑ´Ù. |
byte[] |
getContent()
¼¸íÇÑ ¿øº» ¸Þ½ÃÁö¸¦ ȹµæÇÑ´Ù. |
java.lang.String |
getContentType()
¼¸íÇÑ ¿øº» ¸Þ½ÃÁöÀÇ Á¾·ù¸¦ È®ÀÎÇÑ´Ù. |
java.util.ArrayList |
getDigestAlgorithms()
¼¸í ¸Þ½ÃÁöÀÇ ´ÙÀÌÁ¦½ºÆ® ¾Ë°í¸®Áò ¸ñ·ÏÀ» ȹµæÇÑ´Ù. |
byte[] |
getEncoded()
DER ÀÎÄÚµùµÈ ¼¸í ¸Þ½ÃÁö¸¦ ȹµæÇÑ´Ù. |
void |
getEncoded(java.io.OutputStream os)
DER ÀÎÄÚµùµÈ ¼¸í ¸Þ½ÃÁö¸¦ ȹµæÇÑ´Ù. |
static SignedData |
getInstance(byte[] data)
¼¸í ¸Þ½ÃÁö¸¦ ÀÔ·ÂÇÏ¿© SignedData °´Ã¼·Î º¯È¯ÇÑ´Ù. |
static SignedData |
getInstance(java.lang.Object o)
¼¸í ¸Þ½ÃÁö¸¦ ÀÔ·ÂÇÏ¿© SignedData °´Ã¼·Î º¯È¯ÇÑ´Ù. |
X509Certificate |
getSignerCert(SignerIdentifier sid)
¼¸íÀÚ Á¤º¸¿¡ ÀÖ´Â ¼¸íÀÚ ½Äº°ÀÚ¸¦ ÀÌ¿ëÇÏ¿© ÇØ´ç ¼¸íÀÚ¿¡ ´ëÇÑ ÀÎÁõ¼¸¦ ȹµæÇÑ´Ù. |
java.util.ArrayList |
getSignerInfos()
¼¸í ¸Þ½ÃÁö¿¡ ¼¸íÇÑ »ç¶÷µéÀÇ Á¤º¸¸¦ È®ÀÎÇÑ´Ù. |
java.lang.String |
getType()
¼¸í ¸Þ½ÃÁöÀÇ Á¾·ù¸¦ È®ÀÎÇÑ´Ù. |
int |
getVersion()
¼¸í ¸Þ½ÃÁöÀÇ ¹öÀüÀ» ȹµæÇÑ´Ù. |
void |
insertUnsignedAttributes(int signerIndex,
java.lang.Object attrType,
byte[] attrValue)
|
com.dreamsecurity.jcaos.asn1.cms.SignedData |
toASN1Object()
ASN.1 ÇüÅÂÀÇ SignedData¸¦ ȹµæÇÑ´Ù. |
void |
verify()
¼¸í ¸Þ½ÃÁö¿¡ Æ÷ÇԵǾîÀÖ´Â ¸ðµç ¼¸íÀÚÀÇ ¼¸í°ªÀ» °ËÁõÇÑ´Ù. |
void |
verify(byte[] content)
¼¸í ¸Þ½ÃÁö¿¡ Æ÷ÇԵǾîÀÖ´Â ¸ðµç ¼¸íÀÚÀÇ ¼¸í°ªÀ» °ËÁõÇÑ´Ù. |
void |
verify(java.io.InputStream content)
¼¸í ¸Þ½ÃÁö¿¡ Æ÷ÇԵǾîÀÖ´Â ¸ðµç ¼¸íÀÚÀÇ ¼¸í°ªÀ» °ËÁõÇÑ´Ù. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static SignedData getInstance(byte[] data) throws java.io.IOException
data
- DER ÀÎÄÚµùµÈ ÇüÅÂÀÇ ¼¸í ¸Þ½ÃÁö
java.io.IOException
- µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic static SignedData getInstance(java.lang.Object o) throws java.io.IOException
o
- ¼¸í ¸Þ½ÃÁö (DER ÀÎÄÚµùµÈ °ª, ASN.1 ÇüÅ ¶Ç´Â InputStream ÇüÅÂ)
java.io.IOException
- µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic byte[] getEncoded() throws java.io.IOException
java.io.IOException
public void getEncoded(java.io.OutputStream os) throws java.io.IOException
os
- OuputStream Çü½ÄÀÇ DER ÀÎÄÚµùµÈ ¼¸í ¸Þ½ÃÁö
java.io.IOException
- Ãâ·Â ½ºÆ®¸²¿¡ ¾²±â ½ÇÆÐ½Ã ¹ß»ýpublic com.dreamsecurity.jcaos.asn1.cms.SignedData toASN1Object()
public void addSignerCerts(X509Certificate cert)
cert
- ¼¸íÀÚÀÇ ÀÎÁõ¼public java.lang.String getType()
public int getVersion()
public java.util.ArrayList getDigestAlgorithms()
public java.lang.String getContentType()
public byte[] getContent()
public java.util.ArrayList getCertificates() throws java.io.IOException
java.io.IOException
- ÀÎÁõ¼ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic java.util.ArrayList getSignerInfos() throws java.io.IOException
java.io.IOException
- ¼¸íÀÚ Á¤º¸ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic X509Certificate getSignerCert(SignerIdentifier sid) throws NotExistSignerCertException, ParsingException, java.io.IOException
sid
- ¼¸íÀÚ ½Äº°ÀÚ
NotExistSignerCertException
- ÇØ´ç ¼¸íÀÚ ÀÎÁõ¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý
ParsingException
- ¼¸íÀÚ ½Äº°ÀÚÀÇ À̸§ Á¤º¸¿¡ ó¸®ÇÒ ¼ö ¾ø´Â ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.io.IOException
- Á¤º¸ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic void verify(java.io.InputStream content) throws ParsingException, java.security.NoSuchAlgorithmException, NotExistSignerCertException, java.security.NoSuchProviderException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException, java.security.SignatureException, VerifyException, java.io.IOException
content
- InputStream Çü½ÄÀÇ ¼¸í ¸Þ½ÃÁöÀÇ ¿øº» ¸Þ½ÃÁö
ParsingException
- ¼¸íÀÚ ½Äº°ÀÚÀÇ À̸§ Á¤º¸¿¡ ó¸®ÇÒ ¼ö ¾ø´Â ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
NotExistSignerCertException
- ¼¸í °ËÁõ ½Ã ÇÊ¿äÇÑ ¼¸íÀÚ ÀÎÁõ¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.spec.InvalidKeySpecException
- ÀûÇÕÇÏÁö ¾ÊÀº Ű Á¤º¸ÀÎ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.SignatureException
- ÀϹÝÀûÀÎ ¼¸í°ú °ü·ÃÇÑ ¿¹¿Ü »çÇ× ¹ß»ýÇÑ °æ¿ì ¹ß»ý
VerifyException
- ¼¸í °ËÁõ ½ÇÆÐ ½Ã ¹ß»ý
java.io.IOException
- ÀÔ·Â ½ºÆ®¸² ÀÐ±â ½ÇÆÐ ¶Ç´Â ¼¸í ¸Þ½ÃÁö µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýverify()
public void insertUnsignedAttributes(int signerIndex, java.lang.Object attrType, byte[] attrValue) throws java.io.IOException
java.io.IOException
public void verify(byte[] content) throws ParsingException, java.security.NoSuchAlgorithmException, NotExistSignerCertException, java.security.NoSuchProviderException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException, java.security.SignatureException, VerifyException, java.io.IOException
content
- ¼¸í ¸Þ½ÃÁöÀÇ ¿øº» ¸Þ½ÃÁö
ParsingException
- ¼¸íÀÚ ½Äº°ÀÚÀÇ À̸§ Á¤º¸¿¡ ó¸®ÇÒ ¼ö ¾ø´Â ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
NotExistSignerCertException
- ¼¸í °ËÁõ ½Ã ÇÊ¿äÇÑ ¼¸íÀÚ ÀÎÁõ¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.spec.InvalidKeySpecException
- ÀûÇÕÇÏÁö ¾ÊÀº Ű Á¤º¸ÀÎ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.SignatureException
- ÀϹÝÀûÀÎ ¼¸í°ú °ü·ÃÇÑ ¿¹¿Ü »çÇ× ¹ß»ýÇÑ °æ¿ì ¹ß»ý
VerifyException
- ¼¸í °ËÁõ ½ÇÆÐ ½Ã ¹ß»ý
java.io.IOException
- ¼¸í ¸Þ½ÃÁö µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýverify()
public void verify() throws ParsingException, java.security.NoSuchAlgorithmException, NotExistSignerCertException, java.security.NoSuchProviderException, java.security.spec.InvalidKeySpecException, java.security.InvalidKeyException, java.security.SignatureException, VerifyException, java.io.IOException
ParsingException
- ¼¸íÀÚ ½Äº°ÀÚÀÇ À̸§ Á¤º¸¿¡ ó¸®ÇÒ ¼ö ¾ø´Â ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øµÇÁö ¾Ê´Â ¼¸í ¾Ë°í¸®ÁòÀÌ »ç¿ëµÇ¾úÀ» °æ¿ì¿¡ ¹ß»ý
NotExistSignerCertException
- ¼¸í °ËÁõ ½Ã ÇÊ¿äÇÑ ¼¸íÀÚ ÀÎÁõ¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.spec.InvalidKeySpecException
- ÀûÇÕÇÏÁö ¾ÊÀº Ű Á¤º¸ÀÎ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.SignatureException
- ÀϹÝÀûÀÎ ¼¸í°ú °ü·ÃÇÑ ¿¹¿Ü »çÇ× ¹ß»ýÇÑ °æ¿ì ¹ß»ý
VerifyException
- ¼¸í °ËÁõ ½ÇÆÐ ½Ã ¹ß»ý
java.io.IOException
- µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýverify(byte[])
|
JCaosLib V1.4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |