aboutsummaryrefslogtreecommitdiffstats
path: root/lib/unstable
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-11-17 23:43:47 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-12-04 09:30:55 -0100
commitf08d0532905c211d15effdfa1a9fa4f98921e2a9 (patch)
tree39e8314aa77e6819d5ba5ea8a4271e28caa15501 /lib/unstable
parent4591430c9cbc76c1962e10189d7d6a7326c83946 (diff)
downloadnextcloud-server-f08d0532905c211d15effdfa1a9fa4f98921e2a9.tar.gz
nextcloud-server-f08d0532905c211d15effdfa1a9fa4f98921e2a9.zip
fix(ocm): switching to IdentityProof
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/unstable')
-rw-r--r--lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php18
-rw-r--r--lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php20
-rw-r--r--lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php16
-rw-r--r--lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php80
-rw-r--r--lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php85
5 files changed, 0 insertions, 219 deletions
diff --git a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php b/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php
deleted file mode 100644
index b80834264dc..00000000000
--- a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairConflictException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-namespace NCU\Security\PublicPrivateKeyPairs\Exceptions;
-
-/**
- * conflict between public and private key pair
- *
- * @experimental 31.0.0
- * @since 31.0.0
- */
-class KeyPairConflictException extends KeyPairException {
-}
diff --git a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php b/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php
deleted file mode 100644
index 1cbcf136fd9..00000000000
--- a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairException.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-namespace NCU\Security\PublicPrivateKeyPairs\Exceptions;
-
-use Exception;
-
-/**
- * global exception related to key pairs
- *
- * @experimental 31.0.0
- * @since 31.0.0
- */
-class KeyPairException extends Exception {
-}
diff --git a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php b/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php
deleted file mode 100644
index 138fd882dea..00000000000
--- a/lib/unstable/Security/PublicPrivateKeyPairs/Exceptions/KeyPairNotFoundException.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-namespace NCU\Security\PublicPrivateKeyPairs\Exceptions;
-
-/**
- * @experimental 31.0.0
- * @since 31.0.0
- */
-class KeyPairNotFoundException extends KeyPairException {
-}
diff --git a/lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php b/lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php
deleted file mode 100644
index a993cec7b2b..00000000000
--- a/lib/unstable/Security/PublicPrivateKeyPairs/IKeyPairManager.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-namespace NCU\Security\PublicPrivateKeyPairs;
-
-use NCU\Security\PublicPrivateKeyPairs\Exceptions\KeyPairConflictException;
-use NCU\Security\PublicPrivateKeyPairs\Exceptions\KeyPairNotFoundException;
-use NCU\Security\PublicPrivateKeyPairs\Model\IKeyPair;
-
-/**
- * IKeyPairManager contains a group of method to create/manage/store internal public/private key pair.
- *
- * @experimental 31.0.0
- * @since 31.0.0
- */
-interface IKeyPairManager {
-
- /**
- * generate and store public/private key pair.
- * throws exception if key pair already exist
- *
- * @param string $app appId
- * @param string $name key name
- * @param array $options algorithms, metadata
- *
- * @return IKeyPair
- * @throws KeyPairConflictException if a key already exist
- * @since 31.0.0
- */
- public function generateKeyPair(string $app, string $name, array $options = []): IKeyPair;
-
- /**
- * returns if key pair is known.
- *
- * @param string $app appId
- * @param string $name key name
- *
- * @return bool TRUE if key pair exists in database
- * @since 31.0.0
- */
- public function hasKeyPair(string $app, string $name): bool;
-
- /**
- * return key pair from database based on $app and $name.
- * throws exception if key pair does not exist
- *
- * @param string $app appId
- * @param string $name key name
- *
- * @return IKeyPair
- * @throws KeyPairNotFoundException if key pair is not known
- * @since 31.0.0
- */
- public function getKeyPair(string $app, string $name): IKeyPair;
-
- /**
- * delete key pair from database
- *
- * @param string $app appid
- * @param string $name key name
- *
- * @since 31.0.0
- */
- public function deleteKeyPair(string $app, string $name): void;
-
- /**
- * test key pair by encrypting/decrypting a string
- *
- * @param IKeyPair $keyPair keypair to test
- *
- * @return bool
- * @since 31.0.0
- */
- public function testKeyPair(IKeyPair $keyPair): bool;
-}
diff --git a/lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php b/lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php
deleted file mode 100644
index 92585b9d354..00000000000
--- a/lib/unstable/Security/PublicPrivateKeyPairs/Model/IKeyPair.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-namespace NCU\Security\PublicPrivateKeyPairs\Model;
-
-/**
- * simple model that store key pair, its name, its origin (app)
- * and the options used during its creation
- *
- * @experimental 31.0.0
- * @since 31.0.0
- */
-interface IKeyPair {
- /**
- * returns id of the app owning the key pair
- *
- * @return string
- * @since 31.0.0
- */
- public function getApp(): string;
-
- /**
- * returns name of the key pair
- *
- * @return string
- * @since 31.0.0
- */
- public function getName(): string;
-
- /**
- * set public key
- *
- * @param string $publicKey
- * @return IKeyPair
- * @since 31.0.0
- */
- public function setPublicKey(string $publicKey): IKeyPair;
-
- /**
- * returns public key
- *
- * @return string
- * @since 31.0.0
- */
- public function getPublicKey(): string;
-
- /**
- * set private key
- *
- * @param string $privateKey
- * @return IKeyPair
- * @since 31.0.0
- */
- public function setPrivateKey(string $privateKey): IKeyPair;
-
- /**
- * returns private key
- *
- * @return string
- * @since 31.0.0
- */
- public function getPrivateKey(): string;
-
- /**
- * set options
- *
- * @param array $options
- * @return IKeyPair
- * @since 31.0.0
- */
- public function setOptions(array $options): IKeyPair;
-
- /**
- * returns options
- *
- * @return array
- * @since 31.0.0
- */
- public function getOptions(): array;
-}