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

Value for CertificateTemplateFlags.PersistInDB is incorrect. #49

Closed
pkimike opened this issue May 10, 2022 · 3 comments
Closed

Value for CertificateTemplateFlags.PersistInDB is incorrect. #49

pkimike opened this issue May 10, 2022 · 3 comments
Labels
bug Bug. An issue exist in our code. fixed-vNext

Comments

@pkimike
Copy link

pkimike commented May 10, 2022

DoNotPersistInDB = 0x00000400, // 1024

The value is 4096 not 1024

@Crypt32 Crypt32 added the bug Bug. An issue exist in our code. label May 11, 2022
@Crypt32
Copy link
Collaborator

Crypt32 commented May 11, 2022

Confirmed. It seems that all MSFT docs are incorrect. I will file a bug report to MSFT and update the code.

@Crypt32
Copy link
Collaborator

Crypt32 commented May 11, 2022

The proper flags table:

CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT  = 0x1,
CT_FLAG_ADD_EMAIL                  = 0x2,
CT_FLAG_ADD_OBJ_GUID               = 0x4,
CT_FLAG_PUBLISH_TO_DS              = 0x8,
CT_FLAG_EXPORTABLE_KEY             = 0x10,
CT_FLAG_AUTO_ENROLLMENT            = 0x20,
CT_FLAG_MACHINE_TYPE               = 0x40,
CT_FLAG_IS_CA                      = 0x80,
CT_FLAG_ADD_DIRECTORY_PATH         = 0x100,
CT_FLAG_ADD_TEMPLATE_NAME          = 0x200,
CT_FLAG_ADD_SUBJECT_DIRECTORY_PATH = 0x400,
CT_FLAG_IS_CROSS_CA                = 0x800,
CT_FLAG_DONOTPERSISTINDB           = 0x1000
CT_FLAG_IS_DEFAULT                 = 0x10000,
CT_FLAG_IS_MODIFIED                = 0x20000,
CT_FLAG_IS_DELETED                 = 0x40000,
CT_FLAG_POLICY_MISMATCH            = 0x80000

Crypt32 added a commit that referenced this issue May 11, 2022
Crypt32 added a commit that referenced this issue Jul 6, 2022
* upgraded .NET version to 4.7.2

* added support for KeyBasedRenewal flag in CES URL

* added missing Convert.ToInt32 method on authentication conversion to string

* added missing KeyBasedRenewal bit encoding

* updated CES URL encode to be URI-compliant (spaces replaced with %20)

* ipmproved and updated CRL text dump

* version bump

* updated casing and xml-doc comments

* addressed #49

* added another missing enum value

* code style

* Added ToString() implementation which returns

* addressed #51

* implemented #50

* added basic support for new Microsoft extension 1.3.6.1.4.1.311.25.2 (from KB5014754).

* addressed PKISolutions/PSPKI#76 in backing library

* renamed class and made it static
@Crypt32
Copy link
Collaborator

Crypt32 commented Jun 15, 2023

fixed in v4.0.1

@Crypt32 Crypt32 closed this as completed Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug. An issue exist in our code. fixed-vNext
Projects
None yet
Development

No branches or pull requests

2 participants