summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.in2
-rw-r--r--scripts/oid2der.c17
-rw-r--r--scripts/pubkey_speed.c4
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);