Commit c2500f65 authored by Pauli's avatar Pauli
Browse files

Test cleaning and modernisation

parent 1f06acc0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
@@ -287,7 +287,7 @@ static int print_test_data(void)
    for (j = 0; j < strlen(cbc_data) + 1; j++)
        printf("%02X", ofb64_ok[j]);
    printf("\n");
    return (0);
    return 0;
}

static int test_bf_ecb_raw(int n)
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
@@ -23,7 +23,7 @@
int main(int argc, char *argv[])
{
    printf("No DH support\n");
    return (0);
    return EXIT_SUCCESS;
}
#else
# include <openssl/dh.h>
+2 −1
Original line number Diff line number Diff line
@@ -9,13 +9,14 @@

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <openssl/e_os2.h>

#ifdef OPENSSL_NO_ENGINE
int main(int argc, char *argv[])
{
    printf("No ENGINE support\n");
    return (0);
    return EXIT_SUCCESS;
}
#else
# include <openssl/buffer.h>
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
@@ -232,7 +232,7 @@ static char *pt(unsigned char *md, unsigned int len)

    for (i = 0; i < len; i++)
        sprintf(&(buf[i * 2]), "%02x", md[i]);
    return (buf);
    return buf;
}
# endif

+4 −4
Original line number Diff line number Diff line
/*
 * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
 * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the OpenSSL license (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
@@ -42,7 +42,7 @@ void register_tests(void)
                        BN_bin2bn(dmq1, sizeof(dmq1)-1, NULL),  \
                        BN_bin2bn(iqmp, sizeof(iqmp)-1, NULL)); \
    memcpy(c, ctext_ex, sizeof(ctext_ex) - 1);                  \
    return (sizeof(ctext_ex) - 1);
    return sizeof(ctext_ex) - 1;

static int key1(RSA *key, unsigned char *c)
{
@@ -215,8 +215,8 @@ static int pad_unknown(void)
    unsigned long l;
    while ((l = ERR_get_error()) != 0)
        if (ERR_GET_REASON(l) == RSA_R_UNKNOWN_PADDING_TYPE)
            return (1);
    return (0);
            return 1;
    return 0;
}

static int rsa_setkey(RSA** key, unsigned char* ctext, int idx)
Loading