krypt-core 0.0.1 → 0.0.2.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +14 -0
  3. data/Rakefile +88 -0
  4. data/ext/krypt/core/krypt-core.c +1 -2
  5. data/ext/krypt/core/krypt-core.h +0 -12
  6. data/ext/krypt/core/krypt_asn1_parser.c +2 -2
  7. data/ext/krypt/core/krypt_missing.c +75 -0
  8. data/ext/krypt/core/krypt_missing.h +5 -0
  9. data/ext/krypt/core/krypt_pem.c +1 -1
  10. data/lib/{krypt-core.rb → krypt/core.rb} +8 -1
  11. metadata +40 -80
  12. data/ext/krypt/core/Makefile +0 -221
  13. data/ext/krypt/core/extconf.h +0 -8
  14. data/ext/krypt/core/krypt-core.o +0 -0
  15. data/ext/krypt/core/krypt-provider.h +0 -86
  16. data/ext/krypt/core/krypt_asn1-internal.o +0 -0
  17. data/ext/krypt/core/krypt_asn1.o +0 -0
  18. data/ext/krypt/core/krypt_asn1_codec.o +0 -0
  19. data/ext/krypt/core/krypt_asn1_in_adapter.o +0 -0
  20. data/ext/krypt/core/krypt_asn1_in_chunked.o +0 -0
  21. data/ext/krypt/core/krypt_asn1_in_definite.o +0 -0
  22. data/ext/krypt/core/krypt_asn1_parser.o +0 -0
  23. data/ext/krypt/core/krypt_asn1_template.o +0 -0
  24. data/ext/krypt/core/krypt_asn1_template_encoder.o +0 -0
  25. data/ext/krypt/core/krypt_asn1_template_parser.o +0 -0
  26. data/ext/krypt/core/krypt_b64.o +0 -0
  27. data/ext/krypt/core/krypt_digest.c +0 -391
  28. data/ext/krypt/core/krypt_digest.h +0 -51
  29. data/ext/krypt/core/krypt_digest.o +0 -0
  30. data/ext/krypt/core/krypt_error.o +0 -0
  31. data/ext/krypt/core/krypt_hex.o +0 -0
  32. data/ext/krypt/core/krypt_io.o +0 -0
  33. data/ext/krypt/core/krypt_io_in_pem.o +0 -0
  34. data/ext/krypt/core/krypt_missing.o +0 -0
  35. data/ext/krypt/core/krypt_pem.o +0 -0
  36. data/ext/krypt/core/krypt_provider-internal.h +0 -40
  37. data/ext/krypt/core/krypt_provider.c +0 -136
  38. data/ext/krypt/core/krypt_provider.o +0 -0
  39. data/ext/krypt/core/kryptcore.so +0 -0
  40. data/ext/krypt/core/mkmf.log +0 -130
  41. data/lib/krypt-core/version.rb +0 -3
  42. data/lib/kryptcore.so +0 -0
  43. data/spec/README +0 -2
  44. data/test/README +0 -2
  45. data/test/res/certificate.cer +0 -0
  46. data/test/resources.rb +0 -48
  47. data/test/scratch.rb +0 -17
@@ -1,51 +0,0 @@
1
- /*
2
- * krypt-core API - C implementation
3
- *
4
- * Copyright (c) 2011-2013
5
- * Hiroshi Nakamura <nahi@ruby-lang.org>
6
- * Martin Bosslet <martin.bosslet@gmail.com>
7
- * All rights reserved.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining
10
- * a copy of this software and associated documentation files (the
11
- * "Software"), to deal in the Software without restriction, including
12
- * without limitation the rights to use, copy, modify, merge, publish,
13
- * distribute, sublicense, and/or sell copies of the Software, and to
14
- * permit persons to whom the Software is furnished to do so, subject to
15
- * the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be
18
- * included in all copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
- */
28
-
29
- #ifndef _KRYPT_DIGEST_H_
30
- #define _KRYPT_DIGEST_H_
31
-
32
- extern VALUE mKryptDigest;
33
- extern VALUE eKryptDigestError;
34
-
35
- extern VALUE cKryptNativeDigest;
36
-
37
- krypt_md *krypt_md_new(krypt_provider *provider, const char *name_or_oid);
38
- krypt_md *krypt_md_oid_new(krypt_provider *provider, const char *oid);
39
- krypt_md *krypt_md_name_new(krypt_provider *provider, const char *name);
40
-
41
- int krypt_md_update(krypt_md *md, const void *data, size_t len);
42
- int krypt_md_final(krypt_md *md, uint8_t **digest, size_t *len);
43
- int krypt_md_digest(krypt_md *md, const uint8_t *data, size_t len, uint8_t **digest, size_t *digest_len);
44
- void krypt_md_mark(krypt_md *md);
45
- void krypt_md_free(krypt_md *md);
46
-
47
- VALUE krypt_digest_new(krypt_md *md);
48
-
49
- void Init_krypt_digest(void);
50
-
51
- #endif /* _KRYPT_DIGEST_H_ */
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,40 +0,0 @@
1
- /*
2
- * krypt-core API - C implementation
3
- *
4
- * Copyright (c) 2011-2013
5
- * Hiroshi Nakamura <nahi@ruby-lang.org>
6
- * Martin Bosslet <martin.bosslet@gmail.com>
7
- * All rights reserved.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining
10
- * a copy of this software and associated documentation files (the
11
- * "Software"), to deal in the Software without restriction, including
12
- * without limitation the rights to use, copy, modify, merge, publish,
13
- * distribute, sublicense, and/or sell copies of the Software, and to
14
- * permit persons to whom the Software is furnished to do so, subject to
15
- * the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be
18
- * included in all copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
- */
28
-
29
- #ifndef _KRYPT_PROVIDER_INTERNAL_H_
30
- #define _KRYPT_PROVIDER_INTERNAL_H_
31
-
32
- extern VALUE mKryptProvider;
33
- extern VALUE cKryptNativeProvider;
34
-
35
- /* Implements the boilerplate to connect the native provider to Ruby world */
36
- VALUE krypt_native_provider_new(krypt_provider *provider);
37
-
38
- void Init_krypt_native_provider(void);
39
-
40
- #endif /* _KRYPT_PROVIDER_INTERNAL_H_ */
@@ -1,136 +0,0 @@
1
- /*
2
- * krypt-core API - C implementation
3
- *
4
- * Copyright (c) 2011-2013
5
- * Hiroshi Nakamura <nahi@ruby-lang.org>
6
- * Martin Bosslet <martin.bosslet@gmail.com>
7
- * All rights reserved.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining
10
- * a copy of this software and associated documentation files (the
11
- * "Software"), to deal in the Software without restriction, including
12
- * without limitation the rights to use, copy, modify, merge, publish,
13
- * distribute, sublicense, and/or sell copies of the Software, and to
14
- * permit persons to whom the Software is furnished to do so, subject to
15
- * the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be
18
- * included in all copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
- */
28
-
29
- #include "krypt-core.h"
30
-
31
- VALUE mKryptProvider;
32
- VALUE cKryptNativeProvider;
33
-
34
- static ID sKrypt_ID_register, sKrypt_ID_new_service;
35
-
36
- static void
37
- int_krypt_native_provider_mark(krypt_provider *provider)
38
- {
39
- if (!provider) return;
40
-
41
- /*TODO*/
42
- }
43
-
44
- static void
45
- int_krypt_native_provider_free(krypt_provider *provider)
46
- {
47
- if (!provider) return;
48
-
49
- /*TODO*/
50
- }
51
-
52
- #define int_krypt_native_provider_set(klass, obj, provider) \
53
- do { \
54
- if (!(provider)) { \
55
- rb_raise(eKryptError, "Uninitialized Provider"); \
56
- } \
57
- (obj) = Data_Wrap_Struct((klass), int_krypt_native_provider_mark, int_krypt_native_provider_free, (provider)); \
58
- } while (0)
59
-
60
- #define int_krypt_native_provider_get(obj, provider) \
61
- do { \
62
- Data_Get_Struct((obj), krypt_provider, (provider)); \
63
- if (!(provider)) { \
64
- rb_raise(eKryptError, "Uninitialized Provider"); \
65
- } \
66
- } while (0)
67
-
68
- VALUE
69
- krypt_native_provider_new(krypt_provider *provider)
70
- {
71
- VALUE obj;
72
- int_krypt_native_provider_set(cKryptNativeProvider, obj, provider);
73
- return obj;
74
- }
75
-
76
- static VALUE
77
- int_provider_digest_new(krypt_provider *provider, VALUE aryargs)
78
- {
79
- VALUE vname_or_oid;
80
- const char *name_or_oid;
81
- krypt_md *md;
82
-
83
- if (NIL_P(aryargs)) return Qnil;
84
- vname_or_oid = rb_ary_entry(aryargs, 0);
85
- name_or_oid = StringValueCStr(vname_or_oid);
86
- if ((md = krypt_md_new(provider, name_or_oid))) {
87
- return krypt_digest_new(md);
88
- }
89
- return Qnil;
90
- }
91
-
92
- static VALUE
93
- krypt_native_provider_new_service(int argc, VALUE *argv, VALUE self)
94
- {
95
- VALUE service_class;
96
- VALUE rest = Qnil;
97
- krypt_provider *provider;
98
-
99
- rb_scan_args(argc, argv, "1*", &service_class, &rest);
100
- int_krypt_native_provider_get(self, provider);
101
-
102
- if (service_class == mKryptDigest) {
103
- return int_provider_digest_new(provider, rest);
104
- }
105
-
106
- return Qnil;
107
- }
108
-
109
- void
110
- krypt_provider_register(krypt_provider *provider)
111
- {
112
- VALUE rb_provider;
113
- if (!provider->name) rb_raise(eKryptError, "Provider must have a name");
114
-
115
- rb_provider = krypt_native_provider_new(provider);
116
- rb_funcall(mKryptProvider, sKrypt_ID_register, 2, rb_str_new2(provider->name), rb_provider);
117
- }
118
-
119
- void
120
- Init_krypt_native_provider(void)
121
- {
122
- #if 0
123
- mKrypt = rb_define_module("Krypt"); /* Let RDoc know */
124
- mKryptProvider = rb_define_module_under(mKrypt, "Provider"); /* Let RDoc know */
125
- #endif
126
-
127
- mKryptProvider = rb_path2class("Krypt::Provider");
128
- sKrypt_ID_register = rb_intern("register");
129
- sKrypt_ID_new_service = rb_intern("new_service");
130
-
131
- cKryptNativeProvider = rb_define_class_under(mKryptProvider, "NativeProvider", rb_cObject);
132
-
133
- rb_define_method(cKryptNativeProvider, "new_service", krypt_native_provider_new_service, -1);
134
- rb_undef_method(CLASS_OF(cKryptNativeProvider), "new"); /* private constructor */
135
- }
136
-
Binary file
Binary file
@@ -1,130 +0,0 @@
1
- have_header: checking for ruby/io.h... -------------------- yes
2
-
3
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
4
- checked program was:
5
- /* begin */
6
- 1: #include "ruby.h"
7
- 2:
8
- 3: int main(void) {return 0;}
9
- /* end */
10
-
11
- "gcc -E -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -o conftest.i"
12
- checked program was:
13
- /* begin */
14
- 1: #include "ruby.h"
15
- 2:
16
- 3: #include <ruby/io.h>
17
- /* end */
18
-
19
- --------------------
20
-
21
- have_func: checking for rb_big_pack()... -------------------- yes
22
-
23
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
24
- conftest.c: In function ‘t’:
25
- conftest.c:6:32: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
26
- checked program was:
27
- /* begin */
28
- 1: #include "ruby.h"
29
- 2:
30
- 3: /*top*/
31
- 4: int main(void) {return 0;}
32
- 5: extern int t(void);
33
- 6: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_big_pack; return 0; }
34
- /* end */
35
-
36
- --------------------
37
-
38
- have_func: checking for rb_enumeratorize()... -------------------- yes
39
-
40
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
41
- conftest.c: In function ‘t’:
42
- conftest.c:6:32: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
43
- checked program was:
44
- /* begin */
45
- 1: #include "ruby.h"
46
- 2:
47
- 3: /*top*/
48
- 4: int main(void) {return 0;}
49
- 5: extern int t(void);
50
- 6: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enumeratorize; return 0; }
51
- /* end */
52
-
53
- --------------------
54
-
55
- have_func: checking for rb_str_encode()... -------------------- yes
56
-
57
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
58
- conftest.c: In function ‘t’:
59
- conftest.c:6:57: error: ‘rb_str_encode’ undeclared (first use in this function)
60
- conftest.c:6:57: note: each undeclared identifier is reported only once for each function it appears in
61
- conftest.c:6:32: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
62
- checked program was:
63
- /* begin */
64
- 1: #include "ruby.h"
65
- 2:
66
- 3: /*top*/
67
- 4: int main(void) {return 0;}
68
- 5: extern int t(void);
69
- 6: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_encode; return 0; }
70
- /* end */
71
-
72
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
73
- conftest.c: In function ‘t’:
74
- conftest.c:6:1: warning: implicit declaration of function ‘rb_str_encode’ [-Wimplicit-function-declaration]
75
- checked program was:
76
- /* begin */
77
- 1: #include "ruby.h"
78
- 2:
79
- 3: /*top*/
80
- 4: int main(void) {return 0;}
81
- 5: extern int t(void);
82
- 6: int t(void) { rb_str_encode(); return 0; }
83
- /* end */
84
-
85
- --------------------
86
-
87
- have_func: checking for gmtime_r()... -------------------- yes
88
-
89
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
90
- conftest.c: In function ‘t’:
91
- conftest.c:6:57: error: ‘gmtime_r’ undeclared (first use in this function)
92
- conftest.c:6:57: note: each undeclared identifier is reported only once for each function it appears in
93
- conftest.c:6:32: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
94
- checked program was:
95
- /* begin */
96
- 1: #include "ruby.h"
97
- 2:
98
- 3: /*top*/
99
- 4: int main(void) {return 0;}
100
- 5: extern int t(void);
101
- 6: int t(void) { void ((*volatile p)()); p = (void ((*)()))gmtime_r; return 0; }
102
- /* end */
103
-
104
- "gcc -o conftest -I/home/martin/ruby/include/ruby-2.0.0/x86_64-linux -I/home/martin/ruby/include/ruby-2.0.0/ruby/backward -I/home/martin/ruby/include/ruby-2.0.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c -L. -L/home/martin/ruby/lib -Wl,-R/home/martin/ruby/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/martin/ruby/lib -L/home/martin/ruby/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc"
105
- conftest.c: In function ‘t’:
106
- conftest.c:6:1: warning: implicit declaration of function ‘gmtime_r’ [-Wimplicit-function-declaration]
107
- checked program was:
108
- /* begin */
109
- 1: #include "ruby.h"
110
- 2:
111
- 3: /*top*/
112
- 4: int main(void) {return 0;}
113
- 5: extern int t(void);
114
- 6: int t(void) { gmtime_r(); return 0; }
115
- /* end */
116
-
117
- --------------------
118
-
119
- extconf.h is:
120
- /* begin */
121
- 1: #ifndef EXTCONF_H
122
- 2: #define EXTCONF_H
123
- 3: #define HAVE_RUBY_IO_H 1
124
- 4: #define HAVE_RB_BIG_PACK 1
125
- 5: #define HAVE_RB_ENUMERATORIZE 1
126
- 6: #define HAVE_RB_STR_ENCODE 1
127
- 7: #define HAVE_GMTIME_R 1
128
- 8: #endif
129
- /* end */
130
-
@@ -1,3 +0,0 @@
1
- class Krypt
2
- CORE_VERSION = '0.0.1'
3
- end
data/lib/kryptcore.so DELETED
Binary file
data/spec/README DELETED
@@ -1,2 +0,0 @@
1
- Specs for krypt-core are to be found in the main krypt project at https://github.com/emboss/krypt.
2
-
data/test/README DELETED
@@ -1,2 +0,0 @@
1
- Tests for krypt-core are to be found in the main krypt project at https://github.com/emboss/krypt.
2
-
Binary file
data/test/resources.rb DELETED
@@ -1,48 +0,0 @@
1
- require 'openssl'
2
-
3
- module Resources
4
-
5
- CERTIFICATE = OpenSSL::X509::Certificate.new <<-_EOF_
6
- -----BEGIN CERTIFICATE-----
7
- MIIDPTCCAiWgAwIBAgIBAzANBgkqhkiG9w0BAQQFADA9MRMwEQYKCZImiZPyLGQB
8
- GRYDb3JnMRkwFwYKCZImiZPyLGQBGRYJcnVieS1sYW5nMQswCQYDVQQDDAJDQTAe
9
- Fw0xMTEwMjkxNTM2MzJaFw0xMTEwMjkxNjA2MzJaMD4xEzARBgoJkiaJk/IsZAEZ
10
- FgNvcmcxGTAXBgoJkiaJk/IsZAEZFglydWJ5LWxhbmcxDDAKBgNVBAMMA0VFMjCB
11
- nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAy8LEsNRApz7U/j5DoB4XBgO9Z8At
12
- v5y/OVQRp0ag8Tqo1YewsWijxEWB7JOATwpBN267U4T1nPZIxxEEO7n/WNa2ws9J
13
- Wsjah8ssEBFSxZqdXKSLf0N4Hi7/GQ/aYoaMCiQ8jA4jegK2FJmXM71uPe+jFN/p
14
- eeBOpRfyXxRFOYcCAwEAAaOByjCBxzAOBgNVHQ8BAf8EBAMCBeAwHQYDVR0OBBYE
15
- FNH++fv4rhvBYMv6A+JZbdhzCJITME8GA1UdIwRIMEahQaQ/MD0xEzARBgoJkiaJ
16
- k/IsZAEZFgNvcmcxGTAXBgoJkiaJk/IsZAEZFglydWJ5LWxhbmcxCzAJBgNVBAMM
17
- AkNBggEBMCcGA1UdJQQgMB4GCCsGAQUFBwMCBggrBgEFBQcDBAYIKwYBBQUHAwMw
18
- HAYDVR0RBBUwE4ERZWUyQHJ1YnktbGFuZy5vcmcwDQYJKoZIhvcNAQEEBQADggEB
19
- ABLJKAS9nXFI3idP3dXXs8n4gLBrWHyaacklwnj8gvVoNtYQIICXODY/zQLtzfjx
20
- SQxlrOUtn0uYTzJUNc+NLfc8EzcVDhmSWhq+msCFEyhL5+kBceFj2ZI8f9OuQ87m
21
- zy1yqE1jxP1fsGDZ3Cqny86jJvwRzPW6NkPtkFzS6ZYe09DXDZnUuZP8kVpn4Pit
22
- vHmj/XVKl4LGxlrebReqIn+m2K46uxUkQEDhk7R16SAl6N92W7vI/lXr98aVdfF4
23
- Ozmrzopvt+XbjtvJztDNhpG0G/celhgAOzNx/eq3wl89qHIa+9vvVbFZ0BdYUHai
24
- z+64/9KqwBAeA66J6k7l7C0=
25
- -----END CERTIFICATE-----
26
- _EOF_
27
-
28
- class << self
29
- def certificate
30
- CERTIFICATE.to_der
31
- end
32
-
33
- def certificate_io
34
- File.new(File.expand_path('res/certificate.cer', File.dirname(__FILE__)))
35
- end
36
-
37
- def bytes_to_io(str)
38
- raw = [str.join('')].pack('H*')
39
- StringIO.new raw
40
- end
41
-
42
- def bytes(str)
43
- [str.join('')].pack('H*')
44
- end
45
- end
46
-
47
- end
48
-