Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring updates from master to previews/net5 #1898

Merged
merged 3 commits into from
Apr 20, 2021
Merged

Conversation

abhipsaMisra
Copy link
Member

No description provided.

@abhipsaMisra
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@abhipsaMisra abhipsaMisra merged commit 49b0d78 into previews/net5 Apr 20, 2021
@abhipsaMisra abhipsaMisra deleted the abmisr/net5FI branch April 20, 2021 21:21
@@ -34,12 +34,20 @@ public class SecurityProviderTpmHsm : SecurityProviderTpm
/// <summary>
/// Initializes a new instance of the SecurityProviderTpmHsm class using the system TPM.
/// </summary>
/// <remarks>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things about the code comments here

  1. We are repeating the same thing a lot
  2. The exceptions should be in their own block

We can avoid having multiple copies and use

Example:

/// <summary>
/// Gets the Base64 encoded StorageRootKey.
/// </summary>
/// <remarks>
/// Calls to the TPM library can potentially return a <see cref="TssException"/> or a <see cref="TpmException"/>
/// if your TPM hardware does not support the relevant API call.
/// </remarks>
/// <exception cref="TssException">Thrown when something bad happens with the TPM Software Stack</exception>
/// <exception cref="TpmException">Thrown when something bad happens with the TPM Hardware</exception>
/// <returns>Base64 encoded SRK.</returns>
public override byte[] GetStorageRootKey()
{ ... }

/// <summary>
/// Initializes a new instance of the SecurityProviderTpmHsm class using the specified TPM module.
/// </summary>
/// <param name="registrationId">The Device Provisioning Service Registration Id.</param>
/// <param name="tpm">The TPM device.</param>
/// <inheritdoc cref="GetStorageRootKey" path="/exception"/>
/// <inheritdoc cref="GetStorageRootKey" path="/remarks"/>
public SecurityProviderTpmHsm(string registrationId) : this(registrationId, CreateDefaultTpm2Device()) { }


/// <summary>
/// Gets the Base64 encoded EndorsmentKey.
/// </summary>
/// <returns>Base64 encoded EK.</returns>
/// <inheritdoc cref="GetStorageRootKey" path="/exception['TssException']"/>
/// <inheritdoc cref="GetStorageRootKey" path="/remarks"/>
public override byte[] GetEndorsementKey()
{ ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants