1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "netstack_log.h" 17 #include "gtest/gtest.h" 18 #include <cstring> 19 #include <iostream> 20 21 #include "cert_context.h" 22 #include "net_ssl_async_work.h" 23 #include "net_ssl_exec.h" 24 #include "net_ssl_module.h" 25 26 class NetsslTest : public testing::Test { 27 public: SetUpTestCase()28 static void SetUpTestCase() {} 29 TearDownTestCase()30 static void TearDownTestCase() {} 31 SetUp()32 virtual void SetUp() {} 33 TearDown()34 virtual void TearDown() {} 35 }; 36 37 namespace { 38 using namespace testing::ext; 39 using namespace OHOS::NetStack::Ssl; 40 41 HWTEST_F(NetsslTest, CertVerifyTest001, TestSize.Level1) 42 { 43 napi_env env = nullptr; 44 CertContext context(env, nullptr); 45 46 bool ret = SslExec::ExecVerify(&context); 47 EXPECT_EQ(ret, false); 48 } 49 50 } // namespace