Skip to content

Commit

Permalink
Add ShortSubject and ShortIssuer to Certificate entity (#6234)
Browse files Browse the repository at this point in the history
Progress on #6183
  • Loading branch information
joelverhagen committed Jul 31, 2018
1 parent 50f4335 commit a92d27e
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/NuGetGallery.Core/Entities/Certificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,20 @@ public class Certificate : IEntity
public string Subject { get; set; }

/// <summary>
/// The subject distinguished name of the certificate.
/// The short subject of the certificate. In most cases, this is the CN attribute.
/// </summary>
public string ShortSubject { get; set; }

/// <summary>
/// The issuer distinguished name of the certificate.
/// </summary>
public string Issuer { get; set; }

/// <summary>
/// The short issuer of the certificate. In most cases, this is the CN attribute.
/// </summary>
public string ShortIssuer { get; set; }

/// <summary>
/// The expiration date and time of the certificate.
/// </summary>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace NuGetGallery.Migrations
{
using System;
using System.Data.Entity.Migrations;

public partial class AddShortCertificateNames : DbMigration
{
public override void Up()
{
AddColumn("dbo.Certificates", "ShortSubject", c => c.String());
AddColumn("dbo.Certificates", "ShortIssuer", c => c.String());
}

public override void Down()
{
DropColumn("dbo.Certificates", "ShortIssuer");
DropColumn("dbo.Certificates", "ShortSubject");
}
}
}
Loading

0 comments on commit a92d27e

Please sign in to comment.