mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00
Enable nullable
This commit is contained in:
parent
e7129315c7
commit
442cc2e9cf
@ -258,6 +258,11 @@ public class User : ITableObject<Guid>, IStorableSubscriber, IRevisable, ITwoFac
|
||||
|
||||
public PublicKeyEncryptionKeyPairData GetPublicKeyEncryptionKeyPair()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(PrivateKey) || string.IsNullOrWhiteSpace(PublicKey))
|
||||
{
|
||||
throw new InvalidOperationException("User public key encryption key pair is not fully initialized.");
|
||||
}
|
||||
|
||||
return new PublicKeyEncryptionKeyPairData
|
||||
{
|
||||
WrappedPrivateKey = PrivateKey,
|
||||
|
@ -1,9 +1,10 @@
|
||||
namespace Bit.Core.KeyManagement.Models.Data;
|
||||
|
||||
#nullable enable
|
||||
|
||||
public class PublicKeyEncryptionKeyPairData
|
||||
{
|
||||
public string WrappedPrivateKey { get; set; }
|
||||
public string SignedPublicKey { get; set; }
|
||||
[System.Obsolete("Use SignedPublicKey instead for new code, if it is not null.")]
|
||||
public string PublicKey { get; set; }
|
||||
public required string WrappedPrivateKey { get; set; }
|
||||
public string? SignedPublicKey { get; set; }
|
||||
public required string PublicKey { get; set; }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user