author | weijun |
Thu, 10 Oct 2019 17:36:38 +0300 | |
changeset 59240 | b3116877866f |
parent 50614 | 3810c9a2efa1 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
18240 | 5 |
/** |
6 |
* Licensed to the Apache Software Foundation (ASF) under one |
|
7 |
* or more contributor license agreements. See the NOTICE file |
|
8 |
* distributed with this work for additional information |
|
9 |
* regarding copyright ownership. The ASF licenses this file |
|
10 |
* to you under the Apache License, Version 2.0 (the |
|
11 |
* "License"); you may not use this file except in compliance |
|
12 |
* with the License. You may obtain a copy of the License at |
|
2 | 13 |
* |
18240 | 14 |
* http://www.apache.org/licenses/LICENSE-2.0 |
2 | 15 |
* |
18240 | 16 |
* Unless required by applicable law or agreed to in writing, |
17 |
* software distributed under the License is distributed on an |
|
18 |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
19 |
* KIND, either express or implied. See the License for the |
|
20 |
* specific language governing permissions and limitations |
|
21 |
* under the License. |
|
2 | 22 |
*/ |
23 |
package com.sun.org.apache.xml.internal.security; |
|
24 |
||
25 |
import java.io.InputStream; |
|
26 |
import java.security.AccessController; |
|
27 |
import java.security.PrivilegedAction; |
|
27081 | 28 |
import java.security.PrivilegedActionException; |
29 |
import java.security.PrivilegedExceptionAction; |
|
18240 | 30 |
import java.util.ArrayList; |
31 |
import java.util.List; |
|
32 |
||
2 | 33 |
import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper; |
34 |
import com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithm; |
|
35 |
import com.sun.org.apache.xml.internal.security.c14n.Canonicalizer; |
|
27081 | 36 |
import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; |
2 | 37 |
import com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver; |
38 |
import com.sun.org.apache.xml.internal.security.transforms.Transform; |
|
18240 | 39 |
import com.sun.org.apache.xml.internal.security.utils.ElementProxy; |
2 | 40 |
import com.sun.org.apache.xml.internal.security.utils.I18n; |
41 |
import com.sun.org.apache.xml.internal.security.utils.XMLUtils; |
|
42 |
import com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver; |
|
43 |
import org.w3c.dom.Attr; |
|
44 |
import org.w3c.dom.Document; |
|
45 |
import org.w3c.dom.Element; |
|
46 |
import org.w3c.dom.Node; |
|
47 |
||
48 |
||
49 |
/** |
|
50 |
* This class does the configuration of the library. This includes creating |
|
51 |
* the mapping of Canonicalization and Transform algorithms. Initialization is |
|
52 |
* done by calling {@link Init#init} which should be done in any static block |
|
53 |
* of the files of this library. We ensure that this call is only executed once. |
|
54 |
*/ |
|
18240 | 55 |
public class Init { |
2 | 56 |
|
18240 | 57 |
/** The namespace for CONF file **/ |
58 |
public static final String CONF_NS = "http://www.xmlsecurity.org/NS/#configuration"; |
|
59 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
60 |
private static final com.sun.org.slf4j.internal.Logger LOG = |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
61 |
com.sun.org.slf4j.internal.LoggerFactory.getLogger(Init.class); |
2 | 62 |
|
18240 | 63 |
/** Field alreadyInitialized */ |
64 |
private static boolean alreadyInitialized = false; |
|
2 | 65 |
|
18240 | 66 |
/** |
67 |
* Method isInitialized |
|
68 |
* @return true if the library is already initialized. |
|
69 |
*/ |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
70 |
public static final synchronized boolean isInitialized() { |
18240 | 71 |
return Init.alreadyInitialized; |
72 |
} |
|
73 |
||
74 |
/** |
|
75 |
* Method init |
|
76 |
* |
|
77 |
*/ |
|
78 |
public static synchronized void init() { |
|
79 |
if (alreadyInitialized) { |
|
80 |
return; |
|
81 |
} |
|
2 | 82 |
|
18240 | 83 |
InputStream is = |
84 |
AccessController.doPrivileged( |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
85 |
(PrivilegedAction<InputStream>) |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
86 |
() -> { |
18240 | 87 |
String cfile = |
88 |
System.getProperty("com.sun.org.apache.xml.internal.security.resource.config"); |
|
89 |
if (cfile == null) { |
|
90 |
return null; |
|
91 |
} |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
92 |
return Init.class.getResourceAsStream(cfile); |
18240 | 93 |
} |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
94 |
); |
18240 | 95 |
if (is == null) { |
96 |
dynamicInit(); |
|
97 |
} else { |
|
98 |
fileInit(is); |
|
99 |
} |
|
2 | 100 |
|
18240 | 101 |
alreadyInitialized = true; |
102 |
} |
|
103 |
||
104 |
/** |
|
105 |
* Dynamically initialise the library by registering the default algorithms/implementations |
|
106 |
*/ |
|
107 |
private static void dynamicInit() { |
|
108 |
// |
|
109 |
// Load the Resource Bundle - the default is the English resource bundle. |
|
110 |
// To load another resource bundle, call I18n.init(...) before calling this |
|
111 |
// method. |
|
112 |
// |
|
113 |
I18n.init("en", "US"); |
|
2 | 114 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
115 |
LOG.debug("Registering default algorithms"); |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
116 |
|
18240 | 117 |
try { |
27081 | 118 |
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>(){ |
119 |
@Override public Void run() throws XMLSecurityException { |
|
120 |
// |
|
121 |
// Bind the default prefixes |
|
122 |
// |
|
123 |
ElementProxy.registerDefaultPrefixes(); |
|
18240 | 124 |
|
27081 | 125 |
// |
126 |
// Set the default Transforms |
|
127 |
// |
|
128 |
Transform.registerDefaultAlgorithms(); |
|
18240 | 129 |
|
27081 | 130 |
// |
131 |
// Set the default signature algorithms |
|
132 |
// |
|
133 |
SignatureAlgorithm.registerDefaultAlgorithms(); |
|
134 |
||
135 |
// |
|
136 |
// Set the default JCE algorithms |
|
137 |
// |
|
138 |
JCEMapper.registerDefaultAlgorithms(); |
|
18240 | 139 |
|
27081 | 140 |
// |
141 |
// Set the default c14n algorithms |
|
142 |
// |
|
143 |
Canonicalizer.registerDefaultAlgorithms(); |
|
2 | 144 |
|
27081 | 145 |
// |
146 |
// Register the default resolvers |
|
147 |
// |
|
148 |
ResourceResolver.registerDefaultResolvers(); |
|
2 | 149 |
|
27081 | 150 |
// |
151 |
// Register the default key resolvers |
|
152 |
// |
|
153 |
KeyResolver.registerDefaultResolvers(); |
|
2 | 154 |
|
27081 | 155 |
return null; |
156 |
} |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
157 |
}); |
27081 | 158 |
} catch (PrivilegedActionException ex) { |
159 |
XMLSecurityException xse = (XMLSecurityException)ex.getException(); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
160 |
LOG.error(xse.getMessage(), xse); |
27081 | 161 |
xse.printStackTrace(); |
18240 | 162 |
} |
163 |
} |
|
2 | 164 |
|
18240 | 165 |
/** |
166 |
* Initialise the library from a configuration file |
|
167 |
*/ |
|
168 |
private static void fileInit(InputStream is) { |
|
169 |
try { |
|
2 | 170 |
/* read library configuration file */ |
59240
b3116877866f
8231507: Update Apache Santuario (XML Signature) to version 2.1.4
weijun
parents:
50614
diff
changeset
|
171 |
Document doc = XMLUtils.read(is, false); |
18240 | 172 |
Node config = doc.getFirstChild(); |
173 |
for (; config != null; config = config.getNextSibling()) { |
|
2 | 174 |
if ("Configuration".equals(config.getLocalName())) { |
18240 | 175 |
break; |
2 | 176 |
} |
177 |
} |
|
18240 | 178 |
if (config == null) { |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
179 |
LOG.error("Error in reading configuration file - Configuration element not found"); |
18240 | 180 |
return; |
181 |
} |
|
182 |
for (Node el = config.getFirstChild(); el != null; el = el.getNextSibling()) { |
|
183 |
if (Node.ELEMENT_NODE != el.getNodeType()) { |
|
184 |
continue; |
|
185 |
} |
|
186 |
String tag = el.getLocalName(); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
187 |
if ("ResourceBundles".equals(tag)) { |
18240 | 188 |
Element resource = (Element)el; |
189 |
/* configure internationalization */ |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
190 |
Attr langAttr = resource.getAttributeNodeNS(null, "defaultLanguageCode"); |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
191 |
Attr countryAttr = resource.getAttributeNodeNS(null, "defaultCountryCode"); |
18240 | 192 |
String languageCode = |
193 |
(langAttr == null) ? null : langAttr.getNodeValue(); |
|
194 |
String countryCode = |
|
195 |
(countryAttr == null) ? null : countryAttr.getNodeValue(); |
|
196 |
I18n.init(languageCode, countryCode); |
|
2 | 197 |
} |
18240 | 198 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
199 |
if ("CanonicalizationMethods".equals(tag)) { |
18240 | 200 |
Element[] list = |
201 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "CanonicalizationMethod"); |
|
202 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
203 |
for (Element element : list) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
204 |
String uri = element.getAttributeNS(null, "URI"); |
18240 | 205 |
String javaClass = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
206 |
element.getAttributeNS(null, "JAVACLASS"); |
18240 | 207 |
try { |
208 |
Canonicalizer.register(uri, javaClass); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
209 |
LOG.debug("Canonicalizer.register({}, {})", uri, javaClass); |
18240 | 210 |
} catch (ClassNotFoundException e) { |
211 |
Object exArgs[] = { uri, javaClass }; |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
212 |
LOG.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); |
18240 | 213 |
} |
214 |
} |
|
215 |
} |
|
216 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
217 |
if ("TransformAlgorithms".equals(tag)) { |
18240 | 218 |
Element[] tranElem = |
219 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "TransformAlgorithm"); |
|
2 | 220 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
221 |
for (Element element : tranElem) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
222 |
String uri = element.getAttributeNS(null, "URI"); |
18240 | 223 |
String javaClass = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
224 |
element.getAttributeNS(null, "JAVACLASS"); |
18240 | 225 |
try { |
226 |
Transform.register(uri, javaClass); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
227 |
LOG.debug("Transform.register({}, {})", uri, javaClass); |
18240 | 228 |
} catch (ClassNotFoundException e) { |
229 |
Object exArgs[] = { uri, javaClass }; |
|
2 | 230 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
231 |
LOG.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); |
18240 | 232 |
} catch (NoClassDefFoundError ex) { |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
233 |
LOG.warn("Not able to found dependencies for algorithm, I'll keep working."); |
18240 | 234 |
} |
235 |
} |
|
236 |
} |
|
2 | 237 |
|
18240 | 238 |
if ("JCEAlgorithmMappings".equals(tag)) { |
239 |
Node algorithmsNode = ((Element)el).getElementsByTagName("Algorithms").item(0); |
|
240 |
if (algorithmsNode != null) { |
|
241 |
Element[] algorithms = |
|
242 |
XMLUtils.selectNodes(algorithmsNode.getFirstChild(), CONF_NS, "Algorithm"); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
243 |
for (Element element : algorithms) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
244 |
String id = element.getAttributeNS(null, "URI"); |
18240 | 245 |
JCEMapper.register(id, new JCEMapper.Algorithm(element)); |
2 | 246 |
} |
18240 | 247 |
} |
248 |
} |
|
249 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
250 |
if ("SignatureAlgorithms".equals(tag)) { |
18240 | 251 |
Element[] sigElems = |
252 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "SignatureAlgorithm"); |
|
253 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
254 |
for (Element sigElem : sigElems) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
255 |
String uri = sigElem.getAttributeNS(null, "URI"); |
18240 | 256 |
String javaClass = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
257 |
sigElem.getAttributeNS(null, "JAVACLASS"); |
18240 | 258 |
|
259 |
/** $todo$ handle registering */ |
|
2 | 260 |
|
18240 | 261 |
try { |
262 |
SignatureAlgorithm.register(uri, javaClass); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
263 |
LOG.debug("SignatureAlgorithm.register({}, {})", uri, javaClass); |
18240 | 264 |
} catch (ClassNotFoundException e) { |
265 |
Object exArgs[] = { uri, javaClass }; |
|
2 | 266 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
267 |
LOG.error(I18n.translate("algorithm.classDoesNotExist", exArgs)); |
18240 | 268 |
} |
269 |
} |
|
270 |
} |
|
2 | 271 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
272 |
if ("ResourceResolvers".equals(tag)) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
273 |
Element[] resolverElem = |
18240 | 274 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver"); |
275 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
276 |
for (Element element : resolverElem) { |
18240 | 277 |
String javaClass = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
278 |
element.getAttributeNS(null, "JAVACLASS"); |
18240 | 279 |
String description = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
280 |
element.getAttributeNS(null, "DESCRIPTION"); |
2 | 281 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
282 |
if (description != null && description.length() > 0) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
283 |
LOG.debug("Register Resolver: {}: {}", javaClass, description); |
18240 | 284 |
} else { |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
285 |
LOG.debug("Register Resolver: {}: For unknown purposes", javaClass); |
18240 | 286 |
} |
287 |
try { |
|
288 |
ResourceResolver.register(javaClass); |
|
289 |
} catch (Throwable e) { |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
290 |
LOG.warn( |
18240 | 291 |
"Cannot register:" + javaClass |
292 |
+ " perhaps some needed jars are not installed", |
|
293 |
e |
|
294 |
); |
|
295 |
} |
|
296 |
} |
|
297 |
} |
|
2 | 298 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
299 |
if ("KeyResolver".equals(tag)){ |
18240 | 300 |
Element[] resolverElem = |
301 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "Resolver"); |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
302 |
List<String> classNames = new ArrayList<>(resolverElem.length); |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
303 |
for (Element element : resolverElem) { |
18240 | 304 |
String javaClass = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
305 |
element.getAttributeNS(null, "JAVACLASS"); |
18240 | 306 |
String description = |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
307 |
element.getAttributeNS(null, "DESCRIPTION"); |
2 | 308 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
309 |
if (description != null && description.length() > 0) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
310 |
LOG.debug("Register Resolver: {}: {}", javaClass, description); |
18240 | 311 |
} else { |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
312 |
LOG.debug("Register Resolver: {}: For unknown purposes", javaClass); |
18240 | 313 |
} |
314 |
classNames.add(javaClass); |
|
315 |
} |
|
316 |
KeyResolver.registerClassNames(classNames); |
|
317 |
} |
|
2 | 318 |
|
319 |
||
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
320 |
if ("PrefixMappings".equals(tag)){ |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
321 |
LOG.debug("Now I try to bind prefixes:"); |
2 | 322 |
|
18240 | 323 |
Element[] nl = |
324 |
XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "PrefixMapping"); |
|
2 | 325 |
|
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
326 |
for (Element element : nl) { |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
327 |
String namespace = element.getAttributeNS(null, "namespace"); |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
328 |
String prefix = element.getAttributeNS(null, "prefix"); |
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
329 |
LOG.debug("Now I try to bind {} to {}", prefix, namespace); |
18240 | 330 |
ElementProxy.setDefaultPrefix(namespace, prefix); |
331 |
} |
|
332 |
} |
|
2 | 333 |
} |
18240 | 334 |
} catch (Exception e) { |
50614
3810c9a2efa1
8177334: Update xmldsig implementation to Apache Santuario 2.1.1
weijun
parents:
47216
diff
changeset
|
335 |
LOG.error("Bad: ", e); |
18240 | 336 |
} |
337 |
} |
|
2 | 338 |
|
339 |
} |
|
18240 | 340 |