Skip to content

Commit

Permalink
Remove no longer used files from the codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Oct 21, 2024
1 parent 3237359 commit 7dbb427
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 193 deletions.
2 changes: 0 additions & 2 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ add_library(librnp-obj OBJECT

# other sources
sec_profile.cpp
crypto.cpp
fingerprint.cpp
generate-key.cpp
key-provider.cpp
logging.cpp
json-utils.cpp
Expand Down
50 changes: 0 additions & 50 deletions src/lib/crypto.cpp

This file was deleted.

62 changes: 0 additions & 62 deletions src/lib/crypto.h

This file was deleted.

3 changes: 2 additions & 1 deletion src/lib/crypto/dsa_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "crypto.h"
#include "config.h"
#include "defaults.h"
#include "repgp/repgp_def.h"
#include "dsa_common.h"
#include <cstddef>

pgp_hash_alg_t
dsa_get_min_hash(size_t qsize)
Expand Down
62 changes: 19 additions & 43 deletions src/lib/crypto/symmetric.cpp
Original file line number Diff line number Diff line change
@@ -1,55 +1,29 @@
/*
* Copyright (c) 2017-2024, [Ribose Inc](https://www.ribose.com).
* Copyright (c) 2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is originally derived from software contributed to
* The NetBSD Foundation by Alistair Crooks ([email protected]), and
* carried further by Ribose Inc (https://www.ribose.com).
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Copyright (c) 2005-2008 Nominet UK (www.nic.uk)
* All rights reserved.
* Contributors: Ben Laurie, Rachel Willmer. The Contributors have asserted
* their moral rights under the UK Copyright Design and Patents Act 1988 to
* be recorded as the authors of this copyright work.
*
* 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.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* See the License for the specific language governing permissions and
* limitations under the License.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "crypto.h"
#include "config.h"
#include "defaults.h"

Expand All @@ -59,6 +33,8 @@
#include <botan/ffi.h>
#include <botan/build.h>
#include "utils.h"
#include "repgp/repgp_def.h"
#include "symmetric.h"

static const char *
pgp_sa_to_botan_string(int alg, bool silent = false)
Expand Down
3 changes: 2 additions & 1 deletion src/lib/crypto/symmetric_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "crypto.h"
#include "config.h"
#include "defaults.h"
#include "symmetric.h"
#include <cstring>

void
pgp_cipher_cfb_resync(pgp_crypt_t *crypt, const uint8_t *buf)
Expand Down
24 changes: 0 additions & 24 deletions src/lib/generate-key.cpp

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/pgp-key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include "pgp-key.h"
#include "utils.h"
#include <librekey/key_store_g10.h>
#include "crypto.h"
#include "crypto/s2k.h"
#include "crypto/mem.h"
#include "crypto/signatures.h"
Expand Down
1 change: 0 additions & 1 deletion src/lib/rnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "crypto.h"
#include "crypto/common.h"
#include "pgp-key.h"
#include "defaults.h"
Expand Down
1 change: 0 additions & 1 deletion src/librepgp/stream-dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "crypto/s2k.h"
#include "fingerprint.h"
#include "pgp-key.h"
#include "crypto.h"
#include "json-utils.h"
#include <algorithm>

Expand Down
1 change: 0 additions & 1 deletion src/librepgp/stream-key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "types.h"
#include "fingerprint.h"
#include "pgp-key.h"
#include "crypto.h"
#include "crypto/signatures.h"
#include "crypto/mem.h"
#include "str-utils.h"
Expand Down
1 change: 0 additions & 1 deletion src/librepgp/stream-packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <inttypes.h>
#include <rnp/rnp_def.h>
#include "types.h"
#include "crypto.h"
#include "crypto/mem.h"
#include "stream-packet.h"
#include "stream-key.h"
Expand Down
1 change: 0 additions & 1 deletion src/librepgp/stream-parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "str-utils.h"
#include "types.h"
#include "crypto/s2k.h"
#include "crypto.h"
#include "crypto/signatures.h"
#include "fingerprint.h"
#include "pgp-key.h"
Expand Down
1 change: 0 additions & 1 deletion src/tests/cipher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/

#include <crypto/common.h>
#include <crypto.h>
#include <pgp-key.h>
#include "rnp.h"
#include <librepgp/stream-packet.h>
Expand Down
1 change: 0 additions & 1 deletion src/tests/generatekey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "rnp_tests.h"
#include "support.h"
#include "crypto/common.h"
#include "crypto.h"
#include "pgp-key.h"
#include "librepgp/stream-ctx.h"
#include "librepgp/stream-sig.h"
Expand Down
1 change: 0 additions & 1 deletion src/tests/key-protect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include "rnp_tests.h"
#include "support.h"
#include "crypto.h"
#include "keygen.hpp"

bool
Expand Down
1 change: 0 additions & 1 deletion src/tests/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <stdbool.h>
#include <stdio.h>

#include <crypto.h>
#include <pgp-key.h>
#include <fstream>
#include <vector>
Expand Down

0 comments on commit 7dbb427

Please sign in to comment.