---
title: "Codeunit 3043 DotNet_X509Certificate2"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/3043-dotnet-x509certificate2/
type: codeunit
id: 3043
name: "DotNet_X509Certificate2"
app: "Base Application"
namespace: System.Security.Encryption
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/3043-dotnet-x509certificate2/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 3043 DotNet_X509Certificate2

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/3043-dotnet-x509certificate2/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Security.Encryption |
| Versions | 17-28 |
| Source file | Modules/System/DotNetWrappers/DotNetX509Certificate2.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| X509Certificate2 | (Codeunit DotNet_Array, Text, Codeunit DotNet_X509KeyStorageFlags) | - | public | 17-28 | - | - |
| X509Certificate2 | (Codeunit DotNet_Array, Codeunit DotNet_SecureString, Codeunit DotNet_X509KeyStorageFlags) | - | public | 17-28 | - | - |
| Export | (Codeunit DotNet_X509ContentType, Text, var Codeunit DotNet_Array) | - | public | 17-28 | - | - |
| FriendlyName | () | Text | public | 17-28 | - | - |
| Thumbprint | () | Text | public | 17-28 | - | - |
| Issuer | () | Text | public | 17-28 | - | - |
| Subject | () | Text | public | 17-28 | - | - |
| Expiration | () | DateTime | public | 17-28 | - | - |
| ExpirationLocalTime | () | DateTime | public | 17-28 | - | - |
| HasPrivateKey | () | Boolean | public | 17-28 | - | - |
| IsDotNetNull | () | Boolean | public | 17-28 | - | - |
| PublicKey | (var Codeunit DotNet_AsymmetricAlgorithm) | - | public | 17-28 | - | - |
| PrivateKey | (var Codeunit DotNet_AsymmetricAlgorithm) | - | public | 17-28 | - | - |
| GetX509Certificate2 | (var DotNet X509Certificate2) | - | public | 17-28 | - | - |
| SetX509Certificate2 | (var DotNet X509Certificate2) | - | public | 17-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
