Skip to content

Commit a51f876

Browse files
committed
fixes after agent version
1 parent 2789924 commit a51f876

5 files changed

Lines changed: 8 additions & 44 deletions

File tree

Frends.Pgp.EncryptFile/Frends.Pgp.EncryptFile.Tests/ErrorHandlerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void EncryptFile_TestWithInvalidAndMissingPublicKey()
7676
var ex = Assert.Throws<Exception>(() => Pgp.EncryptFile(input, options, default));
7777
Assert.That(ex.Message, Does.Contain($"No public key found with Key ID {input.PublicKeyId}"));
7878

79-
input.PublicKeyFile = Path.Combine(GetWorkDir(), "nonexisting.asc");
79+
input.PublicKeyPath = Path.Combine(GetWorkDir(), "nonexisting.asc");
8080

8181
ex = Assert.Throws<Exception>(() => Pgp.EncryptFile(input, options, default));
8282
Assert.That(ex.Message, Does.Contain("Public key file not found."));

Frends.Pgp.EncryptFile/Frends.Pgp.EncryptFile.Tests/UnitTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public void EncryptFile_ShouldSignAndEncryptWithDefaultValues()
7272
options.SignWithPrivateKey = true;
7373
options.SigningSettings = new PgpEncryptSigningSettings
7474
{
75-
PrivateKeyFile = Path.Combine(GetWorkDir(), GetPrivateKey()),
76-
PrivateKeyPassword = GetPrivateKeyPassword(),
75+
PrivateKeyPath = Path.Combine(GetWorkDir(), GetPrivateKey()),
76+
PrivateKeyPassphrase = GetPrivateKeyPassword(),
7777
};
7878

7979
var result = Pgp.EncryptFile(input, options, default);
@@ -121,8 +121,8 @@ public void EncryptFile_ShouldSignAndEncryptWithAllAlgorithmCombinations(
121121
options.SignWithPrivateKey = true;
122122
options.SigningSettings = new PgpEncryptSigningSettings
123123
{
124-
PrivateKeyFile = Path.Combine(GetWorkDir(), GetPrivateKey()),
125-
PrivateKeyPassword = GetPrivateKeyPassword(),
124+
PrivateKeyPath = Path.Combine(GetWorkDir(), GetPrivateKey()),
125+
PrivateKeyPassphrase = GetPrivateKeyPassword(),
126126
SignatureHashAlgorithm = signatureHash,
127127
};
128128

@@ -142,8 +142,8 @@ public void EncryptFile_ShouldEncryptWithoutCompression()
142142
options.SignWithPrivateKey = true;
143143
options.SigningSettings = new PgpEncryptSigningSettings
144144
{
145-
PrivateKeyFile = Path.Combine(GetWorkDir(), GetPrivateKey()),
146-
PrivateKeyPassword = GetPrivateKeyPassword(),
145+
PrivateKeyPath = Path.Combine(GetWorkDir(), GetPrivateKey()),
146+
PrivateKeyPassphrase = GetPrivateKeyPassword(),
147147
SignatureHashAlgorithm = PgpEncryptSignatureHashAlgorithm.Sha256,
148148
};
149149

Frends.Pgp.EncryptFile/Frends.Pgp.EncryptFile.Tests/lib/EncryptFileTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void Setup()
2727
{
2828
SourceFilePath = Path.Combine(WorkDir, SourceFile),
2929
OutputFilePath = Path.Combine(WorkDir, EncryptedFile),
30-
PublicKeyFile = Path.Combine(WorkDir, PublicKeyFile),
30+
PublicKeyPath = Path.Combine(WorkDir, PublicKeyFile),
3131
};
3232

3333
options = new Options

Frends.Pgp.EncryptFile/Frends.Pgp.EncryptFile/Definitions/Input.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,6 @@ public class Input
5454
[DisplayFormat(DataFormatString = "Text")]
5555
public string PublicKeyString { get; set; }
5656

57-
/// <summary>
58-
/// Legacy alias for PublicKeyPath.
59-
/// </summary>
60-
/// <example>C:\temp\publicKey.asc</example>
61-
[Browsable(false)]
62-
[EditorBrowsable(EditorBrowsableState.Never)]
63-
public string PublicKeyFile
64-
{
65-
get => PublicKeyPath;
66-
set => PublicKeyPath = value;
67-
}
68-
6957
/// <summary>
7058
/// ID of the correct key in the key ring (Optional).
7159
/// If left empty first suitable key in key ring is used.

Frends.Pgp.EncryptFile/Frends.Pgp.EncryptFile/Definitions/PgpEncryptSigningSettings.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,6 @@ public class PgpEncryptSigningSettings
4949
[PasswordPropertyText]
5050
public string PrivateKeyPassphrase { get; set; }
5151

52-
/// <summary>
53-
/// Legacy alias for PrivateKeyPath.
54-
/// </summary>
55-
/// <example>C:\temp\privateKeyFile.gpg</example>
56-
[Browsable(false)]
57-
[EditorBrowsable(EditorBrowsableState.Never)]
58-
public string PrivateKeyFile
59-
{
60-
get => PrivateKeyPath;
61-
set => PrivateKeyPath = value;
62-
}
63-
64-
/// <summary>
65-
/// Legacy alias for PrivateKeyPassphrase.
66-
/// </summary>
67-
/// <example>passphrase</example>
68-
[Browsable(false)]
69-
[EditorBrowsable(EditorBrowsableState.Never)]
70-
public string PrivateKeyPassword
71-
{
72-
get => PrivateKeyPassphrase;
73-
set => PrivateKeyPassphrase = value;
74-
}
75-
7652
/// <summary>
7753
/// Hash algorithm to use with signature
7854
/// </summary>

0 commit comments

Comments
 (0)