diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-11-21 10:22:31 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-11-21 10:22:31 +0100 |
commit | e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e (patch) | |
tree | ae0c8b5f4cd8289d0797882ea18969f33ea59a1e /scripts | |
parent | 11d6b62db969bdd808d0f56706cb18f113927a31 (diff) | |
download | vyos-strongswan-e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e.tar.gz vyos-strongswan-e1d78dc2faaa06e7c3f71ef674a71e4de2f0758e.zip |
New upstream version 5.6.1
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.in | 2 | ||||
-rw-r--r-- | scripts/oid2der.c | 17 | ||||
-rw-r--r-- | scripts/pubkey_speed.c | 4 |
3 files changed, 21 insertions, 2 deletions
diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 1f1c37bc5..b13d3c5c6 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -305,9 +305,11 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FUZZING_LDFLAGS = @FUZZING_LDFLAGS@ GEM = @GEM@ GENHTML = @GENHTML@ GPERF = @GPERF@ +GPERF_LEN_TYPE = @GPERF_LEN_TYPE@ GPRBUILD = @GPRBUILD@ GREP = @GREP@ INSTALL = @INSTALL@ diff --git a/scripts/oid2der.c b/scripts/oid2der.c index 793c9804a..c8ab8df0f 100644 --- a/scripts/oid2der.c +++ b/scripts/oid2der.c @@ -23,9 +23,26 @@ int main(int argc, char *argv[]) { int i, nr = 0; chunk_t oid; + char *decoded; + bool decode = FALSE; + + if (streq(argv[1], "-d")) + { + decode = TRUE; + nr++; + } while (argc > ++nr) { + if (decode) + { + oid = chunk_from_hex(chunk_from_str(argv[nr]), NULL); + decoded = asn1_oid_to_string(oid); + printf("%s\n", decoded); + free(decoded); + free(oid.ptr); + continue; + } oid = asn1_oid_from_string(argv[nr]); if (oid.len) { diff --git a/scripts/pubkey_speed.c b/scripts/pubkey_speed.c index 66279ada3..2928772b8 100644 --- a/scripts/pubkey_speed.c +++ b/scripts/pubkey_speed.c @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) start_timing(&timing); for (round = 0; round < rounds; round++) { - if (!private->sign(private, scheme, data, &sigs[round])) + if (!private->sign(private, scheme, NULL, data, &sigs[round])) { printf("creating signature failed\n"); exit(1); @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) start_timing(&timing); for (round = 0; round < rounds; round++) { - if (!public->verify(public, scheme, data, sigs[round])) + if (!public->verify(public, scheme, NULL, data, sigs[round])) { printf("signature verification failed\n"); exit(1); |