/[mcrypt]/libmcrypt/lib/mcrypt_modules.c
ViewVC logotype

Contents of /libmcrypt/lib/mcrypt_modules.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (show annotations)
Fri Sep 7 12:34:47 2001 UTC (22 years, 6 months ago) by nmav
Branch: MAIN
Changes since 1.18: +17 -2 lines
File MIME type: text/plain
Finished option which allows for static linking modules into the library

1 /*
2 * Copyright (C) 1998,1999,2000 Nikos Mavroyanopoulos
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Library General Public License as published
6 * by the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20 #ifndef LIBDEFS_H
21 #define LIBDEFS_H
22 #include <libdefs.h>
23 #endif
24 #include <bzero.h>
25 #include <mcrypt_internal.h>
26 #include <xmemory.h>
27
28 #ifndef DEBUG
29 # define fputs(x, y)
30 #endif
31
32 extern const mcrypt_preloaded mps[];
33
34 #define MAX_MOD_SIZE 1024
35
36 static int mcrypt_strcmp( const char* str1, const char* str2) {
37 int i;
38 int len;
39 if (strlen(str1)!=strlen(str2)) return -1;
40 len = strlen(str1);
41
42 for (i=0;i<len;i++) {
43 if (str1[i]=='_' && str2[i]=='-') continue;
44 if (str2[i]=='_' && str1[i]=='-') continue;
45 if (str1[i]!=str2[i]) return -1;
46 }
47
48 return 0;
49 }
50
51 static lt_ptr search_symlist_lib(const char* name) {
52 int i=0;
53
54 while( mps[i].name!=0 || mps[i].address!=0) {
55 if (mps[i].name!=NULL && mps[i].address==NULL) {
56 if (mcrypt_strcmp(name, mps[i].name)==0) {
57 return (void*) -1;
58 }
59 }
60 i++;
61 }
62 return NULL;
63 }
64
65 static lt_ptr search_symlist_sym(mcrypt_dlhandle handle, const char* _name) {
66 int i=0;
67 char name[MAX_MOD_SIZE];
68
69 strcpy(name, handle.name);
70
71 strcat( name, "_LTX_");
72 strcat( name, _name);
73
74 while( mps[i].name!=0 || mps[i].address!=0) {
75 if (mps[i].name!=NULL) {
76 if (mcrypt_strcmp(name, mps[i].name)==0) {
77 return mps[i].address;
78 }
79 }
80 i++;
81 }
82 return NULL;
83 }
84
85 void mcrypt_dlclose( mcrypt_dlhandle handle) {
86 void* mod = handle.handle;
87
88 if (mod!=MCRYPT_INTERNAL_HANDLER && mod!=NULL)
89 lt_dlclose(mod);
90 handle.handle = NULL;
91 }
92
93 lt_ptr mcrypt_dlsym( mcrypt_dlhandle handle, char* str) {
94 void* mod;
95
96 mod = handle.handle;
97
98 if (mod!=MCRYPT_INTERNAL_HANDLER)
99 return lt_dlsym(mod, str);
100 else
101 return search_symlist_sym(handle, str);
102
103 }
104
105 WIN32DLL_DEFINE
106 int mcrypt_module_close(MCRYPT td)
107 {
108 mcrypt_dlclose(td->algorithm_handle);
109 mcrypt_dlclose(td->mode_handle);
110 if (lt_dlexit() != 0) {
111 return MCRYPT_UNKNOWN_ERROR;
112 }
113
114 td->m_encrypt = NULL;
115 td->a_encrypt = NULL;
116 td->a_decrypt = NULL;
117 td->m_decrypt = NULL;
118
119 free(td);
120
121 return 0;
122 }
123
124
125 WIN32DLL_DEFINE
126 void* mcrypt_dlopen ( mcrypt_dlhandle* handle, const char* a_directory, const char *m_directory, const char *filename) {
127
128 char paths[1526];
129
130 if (strlen(filename) > sizeof( handle->name))
131 return MCRYPT_FAILED;
132 else
133 strcpy( handle->name, filename);
134
135 if (search_symlist_lib(filename)!=NULL) {
136 handle->handle = MCRYPT_INTERNAL_HANDLER;
137 return handle->handle;
138 }
139
140 memset( paths, 0, 1024);
141 if (a_directory != NULL) {
142 strncat( paths, a_directory, 512);
143 strcat( paths, ":");
144 }
145 if (m_directory != NULL) {
146 strncat( paths, m_directory, 512);
147 strcat( paths, ":");
148 }
149 strncat( paths, LIBDIR, 512);
150
151 lt_dlsetsearchpath(paths);
152
153 handle->handle = lt_dlopenext(filename);
154
155 return handle->handle;
156
157 }
158
159 WIN32DLL_DEFINE
160 MCRYPT mcrypt_module_open(char *algorithm,
161 char *a_directory, char *mode, char *m_directory)
162 {
163 MCRYPT td;
164 const char* err;
165 void *ret;
166
167 td = calloc(1, sizeof(CRYPT_STREAM));
168 if (td==NULL) return MCRYPT_FAILED;
169
170 if (lt_dlinit() != 0) {
171 return MCRYPT_FAILED;
172 }
173
174 ret = mcrypt_dlopen( &td->algorithm_handle, a_directory, m_directory, algorithm);
175 if (ret == NULL) {
176 err=lt_dlerror();
177 if (err!=NULL) fputs( err, stderr);
178 fputs("\n", stderr);
179 free(td);
180 return MCRYPT_FAILED;
181 }
182
183 ret = mcrypt_dlopen( &td->mode_handle, a_directory, m_directory, mode);
184
185 if (ret == NULL) {
186 err=lt_dlerror();
187 if (err!=NULL) fputs( err, stderr);
188 mcrypt_dlclose(td->algorithm_handle);
189 free(td);
190 return MCRYPT_FAILED;
191 }
192
193 td->a_encrypt = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_encrypt");
194 td->a_decrypt = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_decrypt");
195 td->m_encrypt = mcrypt_dlsym(td->mode_handle, "_mcrypt");
196 td->m_decrypt = mcrypt_dlsym(td->mode_handle, "_mdecrypt");
197 td->a_block_size =
198 mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_block_size");
199
200 if (mcrypt_enc_is_block_algorithm_mode(td) !=
201 mcrypt_enc_is_block_algorithm(td)) {
202 mcrypt_module_close(td);
203 return MCRYPT_FAILED;
204 }
205
206 return td;
207 }
208
209
210
211 /* Modules' frontends */
212
213 WIN32DLL_DEFINE
214 int mcrypt_get_size(MCRYPT td)
215 {
216 int (*_mcrypt_get_size) (void);
217
218 const char *error;
219
220 _mcrypt_get_size = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_size");
221 if (_mcrypt_get_size == NULL) {
222 error = lt_dlerror();
223 if (error!=NULL) fputs(error, stderr);
224 fputs("\n", stderr);
225 return MCRYPT_UNKNOWN_ERROR;
226 }
227 return _mcrypt_get_size();
228 }
229
230 WIN32DLL_DEFINE
231 int mcrypt_mode_get_size(MCRYPT td)
232 {
233 int (*_mcrypt_get_size) (void);
234
235 const char *error;
236
237 _mcrypt_get_size = mcrypt_dlsym(td->mode_handle, "_mcrypt_mode_get_size");
238 if (_mcrypt_get_size == NULL) {
239 error = lt_dlerror();
240 if (error!=NULL) fputs(error, stderr);
241 fputs("\n", stderr);
242 return MCRYPT_UNKNOWN_ERROR;
243 }
244 return _mcrypt_get_size();
245 }
246
247 WIN32DLL_DEFINE
248 int mcrypt_set_key(MCRYPT td, void *a, void *b, int c, void *d, int e)
249 {
250 int (*__mcrypt_set_key_stream) (void *, void *, int, void *, int);
251 int (*__mcrypt_set_key_block) (void *, void *, int);
252 const char *error;
253
254 if (mcrypt_enc_is_block_algorithm(td) == 0) {
255 /* stream */
256 __mcrypt_set_key_stream = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_set_key");
257 if (__mcrypt_set_key_stream == NULL) {
258 error = lt_dlerror();
259 if (error!=NULL) fputs(error, stderr);
260 fputs("\n", stderr);
261 return -2;
262 }
263 return __mcrypt_set_key_stream(a, b, c, d, e);
264 } else {
265 __mcrypt_set_key_block = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_set_key");
266 if (__mcrypt_set_key_block == NULL) {
267 error = lt_dlerror();
268 if (error!=NULL) fputs(error, stderr);
269 fputs("\n", stderr);
270 return -2;
271 }
272 return __mcrypt_set_key_block(a, b, c);
273 }
274 }
275
276 WIN32DLL_DEFINE
277 int mcrypt_enc_set_state(MCRYPT td, void *iv, int size)
278 {
279 int (*__mcrypt_set_state) (void *, void *, int);
280 const char *error;
281
282 __mcrypt_set_state = mcrypt_dlsym(td->mode_handle, "_mcrypt_set_state");
283 if (__mcrypt_set_state==NULL) {
284 error = lt_dlerror();
285 if (error!=NULL) fputs(error, stderr);
286 fputs("\n", stderr);
287 return MCRYPT_UNKNOWN_ERROR;
288 }
289 return __mcrypt_set_state(td->abuf, iv, size);
290 }
291
292 WIN32DLL_DEFINE
293 int mcrypt_enc_get_block_size(MCRYPT td)
294 {
295 int (*_mcrypt_get_block_size) (void);
296
297 _mcrypt_get_block_size = td->a_block_size;
298 return _mcrypt_get_block_size();
299 }
300
301 WIN32DLL_DEFINE
302 int mcrypt_get_algo_iv_size(MCRYPT td)
303 {
304 int (*_mcrypt_get_algo_iv_size) (void);
305
306 _mcrypt_get_algo_iv_size = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_algo_iv_size");
307 return _mcrypt_get_algo_iv_size();
308 }
309
310 WIN32DLL_DEFINE
311 int mcrypt_enc_get_iv_size(MCRYPT td)
312 {
313 if (mcrypt_enc_is_block_algorithm_mode(td) == 1) {
314 return mcrypt_enc_get_block_size(td);
315 } else {
316 return mcrypt_get_algo_iv_size(td);
317 }
318 }
319
320 WIN32DLL_DEFINE
321 int mcrypt_enc_get_key_size(MCRYPT td)
322 {
323 int (*_mcrypt_get_key_size) (void);
324
325 _mcrypt_get_key_size = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_key_size");
326 return _mcrypt_get_key_size();
327 }
328
329 WIN32DLL_DEFINE
330 int *mcrypt_enc_get_supported_key_sizes(MCRYPT td, int *len)
331 {
332 int *(*_mcrypt_get_key_sizes) (int *);
333 int *size;
334
335 _mcrypt_get_key_sizes =
336 mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_supported_key_sizes");
337 size = _mcrypt_get_key_sizes(len);
338
339 return size;
340 }
341
342 WIN32DLL_DEFINE
343 int mcrypt_enc_is_block_algorithm(MCRYPT td)
344 {
345 int (*_is_block_algorithm) (void);
346
347 _is_block_algorithm = mcrypt_dlsym(td->algorithm_handle, "_is_block_algorithm");
348 return _is_block_algorithm();
349 }
350
351 WIN32DLL_DEFINE
352 char *mcrypt_enc_get_algorithms_name(MCRYPT td)
353 {
354 char *(*_mcrypt_get_algorithms_name) (void);
355
356 _mcrypt_get_algorithms_name =
357 mcrypt_dlsym(td->algorithm_handle, "_mcrypt_get_algorithms_name");
358 return _mcrypt_get_algorithms_name();
359 }
360
361 WIN32DLL_DEFINE
362 int init_mcrypt(MCRYPT td, void *buf, void *a, int b, void *c)
363 {
364 int (*_init_mcrypt) (void *, void *, int, void *, int);
365
366 _init_mcrypt = mcrypt_dlsym(td->mode_handle, "_init_mcrypt");
367 return _init_mcrypt(buf, a, b, c, mcrypt_enc_get_block_size(td));
368 }
369
370 WIN32DLL_DEFINE
371 int end_mcrypt(MCRYPT td, void *buf)
372 {
373 int (*_end_mcrypt) (void *);
374
375 _end_mcrypt = mcrypt_dlsym(td->mode_handle, "_end_mcrypt");
376 return _end_mcrypt(buf);
377 }
378
379 WIN32DLL_DEFINE
380 int mcrypt(MCRYPT td, void *buf, void *a, int b)
381 {
382 int (*_mcrypt) (void *, void *, int, int, void *, void *, void*);
383 _mcrypt = td->m_encrypt;
384
385 return _mcrypt(buf, a, b, mcrypt_enc_get_block_size(td), td->akey,
386 td->a_encrypt, td->a_decrypt);
387 }
388
389 WIN32DLL_DEFINE
390 int mdecrypt(MCRYPT td, void *buf, void *a, int b)
391 {
392 int (*_mdecrypt) (void *, void *, int, int, void *, void *, void*);
393
394 _mdecrypt = td->m_decrypt;
395 return _mdecrypt(buf, a, b, mcrypt_enc_get_block_size(td),
396 td->akey, td->a_encrypt, td->a_decrypt);
397 }
398
399 WIN32DLL_DEFINE
400 char *mcrypt_enc_get_modes_name(MCRYPT td)
401 {
402 char *(*_mcrypt_get_modes_name) (void);
403
404 _mcrypt_get_modes_name = mcrypt_dlsym(td->mode_handle, "_mcrypt_get_modes_name");
405 return _mcrypt_get_modes_name();
406 }
407
408 WIN32DLL_DEFINE
409 int mcrypt_enc_is_block_mode(MCRYPT td)
410 {
411 int (*_is_block_mode) (void);
412
413 _is_block_mode = mcrypt_dlsym(td->mode_handle, "_is_block_mode");
414 return _is_block_mode();
415 }
416
417 WIN32DLL_DEFINE
418 int mcrypt_enc_mode_has_iv(MCRYPT td)
419 {
420 int (*_has_iv) (void);
421
422 _has_iv = mcrypt_dlsym(td->mode_handle, "_has_iv");
423 return _has_iv();
424 }
425
426 WIN32DLL_DEFINE
427 int mcrypt_enc_is_block_algorithm_mode(MCRYPT td)
428 {
429 int (*_is_a_block_mode) (void);
430
431 _is_a_block_mode = mcrypt_dlsym(td->mode_handle, "_is_block_algorithm_mode");
432 return _is_a_block_mode();
433 }
434
435 WIN32DLL_DEFINE
436 int mcrypt_enc_self_test(MCRYPT td)
437 {
438 int (*_self_test) (void);
439
440 _self_test = mcrypt_dlsym(td->algorithm_handle, "_mcrypt_self_test");
441
442 return _self_test();
443 }
444
445 WIN32DLL_DEFINE
446 int mcrypt_module_self_test(char *algorithm, char *a_directory)
447 {
448 int i;
449 void* rr;
450 mcrypt_dlhandle _handle;
451 int (*_self_test) (void);
452 const char* error;
453
454 if (lt_dlinit() != 0) {
455 return MCRYPT_UNKNOWN_ERROR;
456 }
457
458 rr = mcrypt_dlopen(&_handle, a_directory, NULL, algorithm);
459
460 if (!rr) {
461 error=lt_dlerror();
462 if (error!=NULL) fputs( error, stderr);
463 fputs("\n", stderr);
464 lt_dlexit();
465 return MCRYPT_UNKNOWN_ERROR;
466 }
467
468 _self_test = mcrypt_dlsym(_handle, "_mcrypt_self_test");
469
470 i = _self_test();
471
472 mcrypt_dlclose(_handle);
473 if (lt_dlexit() != 0) {
474 return MCRYPT_UNKNOWN_ERROR;
475 }
476
477 return i;
478 }
479
480 WIN32DLL_DEFINE
481 int mcrypt_module_algorithm_version(char *algorithm, char *a_directory)
482 {
483 int i;
484 mcrypt_dlhandle _handle;
485 int (*_version) (void);
486 const char* error;
487 void* rr;
488
489 if (lt_dlinit() != 0) {
490 return MCRYPT_UNKNOWN_ERROR;
491 }
492
493 rr = mcrypt_dlopen(&_handle, a_directory, NULL, algorithm);
494 if (!rr) {
495 error=lt_dlerror();
496 if (error!=NULL) fputs( error, stderr);
497 fputs("\n", stderr);
498 return MCRYPT_UNKNOWN_ERROR;
499 }
500
501 _version = mcrypt_dlsym(_handle, "_mcrypt_algorithm_version");
502
503 i = _version();
504
505 mcrypt_dlclose(_handle);
506 if (lt_dlexit() != 0) {
507 return MCRYPT_UNKNOWN_ERROR;
508 }
509
510 return i;
511 }
512
513 WIN32DLL_DEFINE
514 int mcrypt_module_mode_version(char *mode, char *m_directory)
515 {
516 int i;
517 mcrypt_dlhandle _handle;
518 int (*_version) (void);
519 const char* error;
520 void * rr;
521
522 if (lt_dlinit() != 0) {
523 return MCRYPT_UNKNOWN_ERROR;
524 }
525
526 rr = mcrypt_dlopen( &_handle, m_directory, NULL, mode);
527 if (!rr) {
528 error=lt_dlerror();
529 if(error!=NULL) fputs(error, stderr);
530 fputs("\n", stderr);
531 return MCRYPT_UNKNOWN_ERROR;
532 }
533
534 _version = mcrypt_dlsym( _handle, "_mcrypt_mode_version");
535
536 i = _version();
537
538 mcrypt_dlclose(_handle);
539 if (lt_dlexit() != 0) {
540 return MCRYPT_UNKNOWN_ERROR;
541 }
542
543 return i;
544 }
545
546 WIN32DLL_DEFINE
547 int mcrypt_module_is_block_algorithm(char *algorithm, char *a_directory)
548 {
549 int i;
550 mcrypt_dlhandle _handle;
551 int (*_is_block_algorithm) (void);
552 const char* error;
553 void * rr;
554
555 if (lt_dlinit() != 0) {
556 return MCRYPT_UNKNOWN_ERROR;
557 }
558
559 rr = mcrypt_dlopen( &_handle, a_directory, NULL, algorithm);
560 if (!rr) {
561 error=lt_dlerror();
562 if(error!=NULL) fputs( error, stderr);
563 fputs("\n", stderr);
564 return MCRYPT_UNKNOWN_ERROR;
565 }
566
567 _is_block_algorithm = mcrypt_dlsym(_handle, "_is_block_algorithm");
568
569 i = _is_block_algorithm();
570
571 mcrypt_dlclose(_handle);
572 if (lt_dlexit() != 0) {
573 return MCRYPT_UNKNOWN_ERROR;
574 }
575
576 return i;
577 }
578
579 WIN32DLL_DEFINE
580 int mcrypt_module_is_block_algorithm_mode(char *mode, char *m_directory)
581 {
582 int i;
583 mcrypt_dlhandle _handle;
584 int (*_is_a_block_mode) (void);
585 const char* error;
586 void * rr;
587
588 if (lt_dlinit() != 0) {
589 return MCRYPT_UNKNOWN_ERROR;
590 }
591
592 rr = mcrypt_dlopen( &_handle, m_directory, NULL, mode);
593 if (!rr) {
594 error=lt_dlerror();
595 if(error!=NULL) fputs( error, stderr);
596 fputs("\n", stderr);
597 return MCRYPT_UNKNOWN_ERROR;
598 }
599
600 _is_a_block_mode = mcrypt_dlsym(_handle, "_is_block_algorithm_mode");
601
602 i = _is_a_block_mode();
603
604 mcrypt_dlclose(_handle);
605 if (lt_dlexit() != 0) {
606 return MCRYPT_UNKNOWN_ERROR;
607 }
608
609 return i;
610 }
611
612 WIN32DLL_DEFINE
613 int mcrypt_module_is_block_mode(char *mode, char *m_directory)
614 {
615 void * rr;
616 int i;
617 mcrypt_dlhandle _handle;
618 int (*_is_block_mode) (void);
619 const char* error;
620
621 if (lt_dlinit() != 0) {
622 return MCRYPT_UNKNOWN_ERROR;
623 }
624
625 rr = mcrypt_dlopen( &_handle, m_directory, NULL, mode);
626 if (!rr) {
627 error=lt_dlerror();
628 if(error!=NULL) fputs( error, stderr);
629 fputs("\n", stderr);
630 return MCRYPT_UNKNOWN_ERROR;
631 }
632
633 _is_block_mode = mcrypt_dlsym(_handle, "_is_block_mode");
634
635 i = _is_block_mode();
636
637 mcrypt_dlclose(_handle);
638 if (lt_dlexit() != 0) {
639 return MCRYPT_UNKNOWN_ERROR;
640 }
641
642 return i;
643 }
644
645 WIN32DLL_DEFINE
646 int mcrypt_module_get_algo_block_size(char *algorithm, char *a_directory)
647 {
648 int i;
649 mcrypt_dlhandle _handle;
650 int (*_get_block_size) (void);
651 const char* error;
652 void * rr;
653
654 if (lt_dlinit() != 0) {
655 return MCRYPT_UNKNOWN_ERROR;
656 }
657
658 rr = mcrypt_dlopen( &_handle, a_directory, NULL, algorithm);
659 if (!rr) {
660 error=lt_dlerror();
661 if(error!=NULL) fputs( error, stderr);
662 fputs("\n", stderr);
663 return MCRYPT_UNKNOWN_ERROR;
664 }
665
666 _get_block_size = mcrypt_dlsym(_handle, "_mcrypt_get_block_size");
667
668 i = _get_block_size();
669
670 mcrypt_dlclose(_handle);
671 if (lt_dlexit() != 0) {
672 return MCRYPT_UNKNOWN_ERROR;
673 }
674
675 return i;
676 }
677
678 WIN32DLL_DEFINE
679 int mcrypt_module_get_algo_key_size(char *algorithm, char *a_directory)
680 {
681 int i;
682 mcrypt_dlhandle _handle;
683 int (*_get_key_size) (void);
684 const char* error;
685 void * rr;
686
687 if (lt_dlinit() != 0) {
688 return MCRYPT_UNKNOWN_ERROR;
689 }
690
691 rr = mcrypt_dlopen( &_handle, a_directory, NULL, algorithm);
692 if (!rr) {
693 error=lt_dlerror();
694 if(error!=NULL) fputs( error, stderr);
695 fputs("\n", stderr);
696 return MCRYPT_UNKNOWN_ERROR;
697 }
698
699 _get_key_size = mcrypt_dlsym(_handle, "_mcrypt_get_key_size");
700
701 i = _get_key_size();
702
703 mcrypt_dlclose(_handle);
704 if (lt_dlexit() != 0) {
705 return MCRYPT_UNKNOWN_ERROR;
706 }
707
708 return i;
709 }
710
711 WIN32DLL_DEFINE
712 int *mcrypt_module_get_algo_supported_key_sizes(char *algorithm,
713 char *a_directory,
714 int *len)
715 {
716 mcrypt_dlhandle _handle;
717 int *(*_mcrypt_get_key_sizes) (int *);
718 int *size;
719 const char* error;
720 void * rr;
721
722 if (lt_dlinit() != 0) {
723 *len = 0;
724 return NULL;
725 }
726
727 rr = mcrypt_dlopen( &_handle, a_directory, NULL, algorithm);
728 if (!rr) {
729 error=lt_dlerror();
730 if(error!=NULL) fputs( error, stderr);
731 fputs("\n", stderr);
732 *len = 0;
733 return NULL;
734 }
735
736 _mcrypt_get_key_sizes =
737 mcrypt_dlsym(_handle, "_mcrypt_get_supported_key_sizes");
738
739 size = _mcrypt_get_key_sizes(len);
740
741 mcrypt_dlclose(_handle);
742 if (lt_dlexit() != 0) {
743 return NULL;
744 }
745
746 return size;
747 }

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26