01: /*
02: * SignedInfo.java
03: *
04: * Created on January 24, 2006, 3:12 PM
05: */
06:
07: /*
08: * The contents of this file are subject to the terms
09: * of the Common Development and Distribution License
10: * (the License). You may not use this file except in
11: * compliance with the License.
12: *
13: * You can obtain a copy of the license at
14: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
15: * See the License for the specific language governing
16: * permissions and limitations under the License.
17: *
18: * When distributing Covered Code, include this CDDL
19: * Header Notice in each file and include the License file
20: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
21: * If applicable, add the following below the CDDL Header,
22: * with the fields enclosed by brackets [] replaced by
23: * you own identifying information:
24: * "Portions Copyrighted [year] [name of copyright owner]"
25: *
26: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
27: */
28:
29: package com.sun.xml.ws.security.opt.crypto.dsig;
30:
31: import java.io.InputStream;
32: import java.util.List;
33: import javax.xml.bind.annotation.XmlRootElement;
34: import javax.xml.bind.annotation.XmlTransient;
35: import org.jvnet.staxex.XMLStreamReaderEx;
36:
37: /**
38: *
39: * @author Abhijit Das
40: */
41: @XmlRootElement(name="SignedInfo",namespace="http://www.w3.org/2000/09/xmldsig#")
42: public class SignedInfo extends
43: com.sun.xml.security.core.dsig.SignedInfoType implements
44: javax.xml.crypto.dsig.SignedInfo {
45: @XmlTransient
46: private XMLStreamReaderEx _streamSI = null;
47: @XmlTransient
48: private byte[] canonInfo = null;
49:
50: /** Creates a new instance of SignedInfo */
51: public SignedInfo() {
52: }
53:
54: public List getReferences() {
55: return reference;
56: }
57:
58: public InputStream getCanonicalizedData() {
59: return null;
60: }
61:
62: public boolean isFeatureSupported(String string) {
63: return false;
64: }
65:
66: public SignatureMethod getSignatureMethod() {
67: return signatureMethod;
68: }
69:
70: public CanonicalizationMethod getCanonicalizationMethod() {
71: return canonicalizationMethod;
72: }
73:
74: public void setReference(List<Reference> reference) {
75: this .reference = reference;
76: }
77:
78: public byte[] getCanonicalizedSI() {
79: //System.out.println("CanonSI is "+ new String(canonInfo));
80: return canonInfo;
81: }
82:
83: public void setCanonicalizedSI(byte[] info) {
84: this .canonInfo = info;
85: }
86:
87: public XMLStreamReaderEx getSignedInfo() {
88: return _streamSI;
89: }
90:
91: public void setSignedInfo(XMLStreamReaderEx _streamSI) {
92: this._streamSI = _streamSI;
93: }
94: }
|