mirror of
https://github.com/strongswan/strongswan.git
synced 2025-12-08 00:00:29 -05:00
scripts: Initialize libstrongswan in id2sql to fix a crash
Since 770f4ccee12d ("identification: Optionally match RDNs in any order
and accept missing RDNs") the DN parser requires lib->settings.
This commit is contained in:
parent
d2c15b7bf9
commit
b3e7b79cc5
@ -14,6 +14,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <library.h>
|
||||||
#include <utils/identification.h>
|
#include <utils/identification.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -25,6 +27,9 @@ int main(int argc, char *argv[])
|
|||||||
chunk_t enc;
|
chunk_t enc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
library_init(NULL, "id2sql");
|
||||||
|
atexit(library_deinit);
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
@ -45,6 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
printf("%02x", (unsigned int)enc.ptr[i]);
|
printf("%02x", (unsigned int)enc.ptr[i]);
|
||||||
}
|
}
|
||||||
printf("'\n");
|
printf("'\n");
|
||||||
|
id->destroy(id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user