Skip to content

Commit 70fe240

Browse files
committed
template parameter to include client auth eku
1 parent 52eee75 commit 70fe240

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

digicert-certcentral-caplugin/API/OrderCertificate.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ public class CertificateRequest
101101

102102
[JsonProperty("ca_cert_id")]
103103
public string CACertID { get; set; }
104+
105+
[JsonProperty("profile_option")]
106+
public string ProfileOption { get; set; }
104107
}
105108

106109
public class CertificateOrderContainer

digicert-certcentral-caplugin/CertCentralCAPlugin.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ public async Task<EnrollmentResult> Enroll(string csr, string subject, Dictionar
294294
string priorCertSnString = null;
295295
string priorCertReqID = null;
296296

297+
if (typeOfCert.Equals("ssl") && Convert.ToBoolean(productInfo.ProductParameters[CertCentralConstants.Config.INCLUDE_CLIENT_AUTH]))
298+
{
299+
orderRequest.Certificate.ProfileOption = "server_client_auth_eku";
300+
}
301+
297302
// Current gateway core leaves it up to the integration to determine if it is a renewal or a reissue
298303
if (enrollmentType == EnrollmentType.RenewOrReissue)
299304
{
@@ -584,6 +589,13 @@ public Dictionary<string, PropertyConfigInfo> GetTemplateParameterAnnotations()
584589
DefaultValue = "ssl",
585590
Type = "String"
586591
},
592+
[CertCentralConstants.Config.INCLUDE_CLIENT_AUTH] = new PropertyConfigInfo()
593+
{
594+
Comments = "OPTIONAL for SSL certs, ignored otherwise. If set to 'true', SSL certs enrolled under this template will have the Client Authentication EKU added to the request. NOTE: This feature is currently planned to be removed by DigiCert in May 2026.",
595+
Hidden = false,
596+
DefaultValue = false,
597+
Type = "Boolean"
598+
},
587599
[CertCentralConstants.Config.ENROLL_DIVISION_ID] = new PropertyConfigInfo()
588600
{
589601
Comments = "OPTIONAL: The division (container) ID to use for enrollments against this template.",

digicert-certcentral-caplugin/Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class Config
3232
public const string FILTER_EXPIRED = "FilterExpiredOrders";
3333
public const string SYNC_EXPIRATION_DAYS = "SyncExpirationDays";
3434
public const string CERT_TYPE = "CertType";
35+
public const string INCLUDE_CLIENT_AUTH = "IncludeClientAuthEKU";
3536
public const string ENROLL_DIVISION_ID = "EnrollDivisionId";
3637
public const string COMMON_NAME_INDICATOR = "CommonNameIndicator";
3738
public const string PROFILE_TYPE = "ProfileType";

0 commit comments

Comments
 (0)