From 9370f90d46f7ab02e3cc0389ef3c4e0aca32e368 Mon Sep 17 00:00:00 2001 From: Piotr Nowicki Date: Fri, 13 Mar 2020 14:43:22 +0100 Subject: [PATCH] Initial work on the ssl dump program from base64 code Signed-off-by: Piotr Nowicki --- programs/.gitignore | 1 + programs/Makefile | 5 +++++ programs/ssl/CMakeLists.txt | 3 +++ programs/ssl/ssl_base64_dump.c | 26 ++++++++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 programs/ssl/ssl_base64_dump.c diff --git a/programs/.gitignore b/programs/.gitignore index d19162de1..2fd5b21eb 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -45,6 +45,7 @@ ssl/ssl_mail_client ssl/ssl_pthread_server ssl/ssl_server ssl/ssl_server2 +ssl/ssl_base64_dump ssl/mini_client test/benchmark test/ecp-bench diff --git a/programs/Makefile b/programs/Makefile index deb19b6e3..9ae8f459b 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -84,6 +84,7 @@ APPS = \ ssl/ssl_client2$(EXEXT) \ ssl/ssl_server$(EXEXT) \ ssl/ssl_server2$(EXEXT) \ + ssl/ssl_base64_dump$(EXEXT) \ ssl/ssl_fork_server$(EXEXT) \ ssl/mini_client$(EXEXT) \ ssl/ssl_mail_client$(EXEXT) \ @@ -282,6 +283,10 @@ ssl/ssl_server2$(EXEXT): ssl/ssl_server2.c test/query_config.c $(DEP) echo " CC ssl/ssl_server2.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_server2.c test/query_config.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ +ssl/ssl_base64_dump$(EXEXT): ssl/ssl_base64_dump.c test/query_config.c $(DEP) + echo " CC ssl/ssl_base64_dump.c" + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_base64_dump.c test/query_config.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ + ssl/ssl_fork_server$(EXEXT): ssl/ssl_fork_server.c $(DEP) echo " CC ssl/ssl_fork_server.c" $(CC) $(LOCAL_CFLAGS) $(CFLAGS) ssl/ssl_fork_server.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt index f28a47d87..0e6c6324b 100644 --- a/programs/ssl/CMakeLists.txt +++ b/programs/ssl/CMakeLists.txt @@ -44,6 +44,9 @@ add_executable(ssl_server2 ssl_server2.c) target_sources(ssl_server2 PUBLIC ../test/query_config.c) target_link_libraries(ssl_server2 ${libs}) +add_executable(ssl_base64_dump ssl_base64_dump.c) +target_link_libraries(ssl_base64_dump ${libs}) + add_executable(ssl_fork_server ssl_fork_server.c) target_link_libraries(ssl_fork_server ${libs}) diff --git a/programs/ssl/ssl_base64_dump.c b/programs/ssl/ssl_base64_dump.c new file mode 100644 index 000000000..3b664c990 --- /dev/null +++ b/programs/ssl/ssl_base64_dump.c @@ -0,0 +1,26 @@ +/* + * MbedTLS SSL context deserializer from base64 code + * + * Copyright (C) 2006-2020, ARM Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This file is part of mbed TLS (https://tls.mbed.org) + */ + +int main( int argc, char *argv[] ) +{ + + return 0; +}