xmlsec-ruby 0.0.5a → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/xmlsec/simple-xmlsec.c +23 -0
- metadata +9 -12
data/ext/xmlsec/simple-xmlsec.c
CHANGED
@@ -83,7 +83,9 @@ xmlSecAppAddIDAttr(xmlNodePtr node, const xmlChar* attrName, const xmlChar* node
|
|
83
83
|
int verify_file(const char* xmlMessage, const char* key) {
|
84
84
|
xmlDocPtr doc = NULL;
|
85
85
|
/* Init libxml and libxslt libraries */
|
86
|
+
xmlInitParser();
|
86
87
|
LIBXML_TEST_VERSION
|
88
|
+
xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
87
89
|
xmlSubstituteEntitiesDefault(1);
|
88
90
|
doc = xmlParseDoc((xmlChar *) xmlMessage) ;
|
89
91
|
return verify_document(doc, key);
|
@@ -169,6 +171,21 @@ int initialize()
|
|
169
171
|
return(-1);
|
170
172
|
}
|
171
173
|
|
174
|
+
/* Load default crypto engine if we are supporting dynamic
|
175
|
+
* loading for xmlsec-crypto libraries. Use the crypto library
|
176
|
+
* name ("openssl", "nss", etc.) to load corresponding
|
177
|
+
* xmlsec-crypto library.
|
178
|
+
*/
|
179
|
+
#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
|
180
|
+
if(xmlSecCryptoDLLoadLibrary(BAD_CAST XMLSEC_CRYPTO) < 0) {
|
181
|
+
fprintf(stdout, "Error: unable to load default xmlsec-crypto library. Make sure\n"
|
182
|
+
"that you have it installed and check shared libraries path\n"
|
183
|
+
"(LD_LIBRARY_PATH) envornment variable.\n");
|
184
|
+
fflush(stdout) ;
|
185
|
+
return(-1);
|
186
|
+
}
|
187
|
+
#endif /* XMLSEC_CRYPTO_DYNAMIC_LOADING */
|
188
|
+
|
172
189
|
/* Init xmlsec-crypto library */
|
173
190
|
if(xmlSecCryptoInit() < 0) {
|
174
191
|
fprintf(stderr, "Error: xmlsec-crypto initialization failed.\n");
|
@@ -188,5 +205,11 @@ void SecShutdown()
|
|
188
205
|
|
189
206
|
/* Shutdown xmlsec library */
|
190
207
|
xmlSecShutdown();
|
208
|
+
|
209
|
+
/* Shutdown libxslt/libxml */
|
210
|
+
#ifndef XMLSEC_NO_XSLT
|
211
|
+
xsltCleanupGlobals();
|
212
|
+
#endif /* XMLSEC_NO_XSLT */
|
213
|
+
xmlCleanupParser();
|
191
214
|
return ;
|
192
215
|
}
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmlsec-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 5
|
10
|
-
|
11
|
-
version: 0.0.5a
|
10
|
+
version: 0.0.5
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Victor Lin
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date:
|
18
|
+
date: 2010-09-21 00:00:00 -07:00
|
20
19
|
default_executable:
|
21
20
|
dependencies: []
|
22
21
|
|
@@ -54,18 +53,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
54
|
none: false
|
56
55
|
requirements:
|
57
|
-
- - "
|
56
|
+
- - ">="
|
58
57
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
58
|
+
hash: 3
|
60
59
|
segments:
|
61
|
-
-
|
62
|
-
|
63
|
-
- 1
|
64
|
-
version: 1.3.1
|
60
|
+
- 0
|
61
|
+
version: "0"
|
65
62
|
requirements: []
|
66
63
|
|
67
64
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.3.7
|
69
66
|
signing_key:
|
70
67
|
specification_version: 3
|
71
68
|
summary: Ruby bindings for xmlsec1
|