Home | History | Annotate | Line # | Download | only in test
      1 /*
      2  * Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
      3  *
      4  * Licensed under the Apache License 2.0 (the "License").  You may not use
      5  * this file except in compliance with the License.  You can obtain a copy
      6  * in the file LICENSE in the source distribution or at
      7  * https://www.openssl.org/source/license.html
      8  */
      9 
     10 #include <stdio.h>
     11 #include <stdlib.h>
     12 #include <string.h>
     13 
     14 #include <openssl/evp.h>
     15 #include "testutil.h"
     16 
     17 static int test_evp_get_digestbyname(void)
     18 {
     19     const EVP_MD *md;
     20 
     21     if (!TEST_ptr(md = EVP_get_digestbyname("SHA2-256")))
     22         return 0;
     23     return 1;
     24 }
     25 
     26 static int test_evp_get_cipherbyname(void)
     27 {
     28     const EVP_CIPHER *cipher;
     29 
     30     if (!TEST_ptr(cipher = EVP_get_cipherbyname("AES-256-WRAP")))
     31         return 0;
     32     return 1;
     33 }
     34 
     35 int setup_tests(void)
     36 {
     37     ADD_TEST(test_evp_get_digestbyname);
     38     ADD_TEST(test_evp_get_cipherbyname);
     39     return 1;
     40 }
     41