File tree Expand file tree Collapse file tree
app/src/androidTest/java/com/owncloud/android/operations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import com.owncloud.android.lib.resources.users.DeletePublicKeyRemoteOperation
1414import com.owncloud.android.lib.resources.users.GetPrivateKeyRemoteOperation
1515import com.owncloud.android.lib.resources.users.GetPublicKeyRemoteOperation
1616import com.owncloud.android.lib.resources.users.StorePrivateKeyRemoteOperation
17+ import com.owncloud.android.utils.EncryptionUtils
18+ import com.owncloud.android.utils.crypto.CryptoHelper
1719import org.junit.Assert.assertFalse
1820import org.junit.Assert.assertTrue
1921import org.junit.Test
@@ -29,7 +31,17 @@ class DeleteE2ERemoteOperationIT : AbstractOnServerIT() {
2931
3032 @Test
3133 fun testDeletePrivateKey () {
32- StorePrivateKeyRemoteOperation (" private_key" ).execute(nextcloudClient)
34+ val keyPair = EncryptionUtils .generateKeyPair()
35+ val privateKey = keyPair.private
36+ val keyPhrase = " moreovertelevisionfactorytendencyindependenceinternationalintellectualimpress" +
37+ " interestvolunteer"
38+ val privatePemKeyString = EncryptionUtils .privateKeyToPEM(privateKey)
39+ val encryptedPrivateKey = CryptoHelper .encryptPrivateKey(
40+ privatePemKeyString,
41+ keyPhrase
42+ )
43+
44+ StorePrivateKeyRemoteOperation (encryptedPrivateKey).execute(nextcloudClient)
3345
3446 val sut = DeletePrivateKeyRemoteOperation ()
3547 val result = sut.execute(nextcloudClient)
Original file line number Diff line number Diff line change 2109421094 <sha256 value="69722898d31a3a5ad32cc372f2a14a057902c75bd14019570cbfc221a67fc52c" origin="Generated by Gradle" reason="Artifact is not signed"/>
2109521095 </artifact>
2109621096 </component>
21097+ <component group="com.github.nextcloud" name="android-library" version="3c4d9d6">
21098+ <artifact name="android-library-3c4d9d6.aar">
21099+ <sha256 value="24093678fe62d18725875dba92603e92e47013844b7d67cb5c83116f78af65c4" origin="Generated by Gradle" reason="Artifact is not signed"/>
21100+ </artifact>
21101+ <artifact name="android-library-3c4d9d6.module">
21102+ <sha256 value="9e53f9f1a8a4c84165d8f408febe67c80a0591791730ef70ea97ba60d1eb586d" origin="Generated by Gradle" reason="Artifact is not signed"/>
21103+ </artifact>
21104+ </component>
2109721105 <component group="com.github.nextcloud" name="android-library" version="3d422b28376339c0fbd772e480dbbdc56b7ae1a1">
2109821106 <artifact name="android-library-3d422b28376339c0fbd772e480dbbdc56b7ae1a1.aar">
2109921107 <sha256 value="58debdb6fecf8f254f38bed011ea4849405017679c7978755e2a004031b3f69e" origin="Generated by Gradle" reason="Artifact is not signed"/>
You can’t perform that action at this time.
0 commit comments