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

Adding more attributes to search result #5

Open
aria321 opened this issue Dec 4, 2018 · 0 comments
Open

Adding more attributes to search result #5

aria321 opened this issue Dec 4, 2018 · 0 comments

Comments

@aria321
Copy link

aria321 commented Dec 4, 2018

Thank you for your grate and useful application, from what I have read in articles "LDAP query page control allows a client to control the rate at which an LDAP server returns the results of an LDAP search operation" so as you can see in below screenshot in real LDAP there is control in search result , I made decision to ask a question separately than #4 , I should to thank you for your quick response.

You know we are using a system which can be integrated with LDAP server, when we config that to a real LDAP it works but when it is config-ed to use custom LDAP server it does not work, everything untill here is nice but one thing remained that I think is important for our LDAP consumer system, for this reason I think I have to make a response just like the first capture, for example in real LDAP there is an attribute in searchResDone named control

sc

1- How control can be added to search result as attribute or something:

LCore.LdapPacket response = new LCore.LdapPacket(MessageID);
var searchAttribSuccess = new LCore.LdapResultAttribute(LCore.LdapOperation.SearchResultDone, LCore.LdapResult.success); 
// Add control to search result done or something
response.ChildAttributes.Add(searchAttribSuccess);

2- And how can I make userCertificate attribute in C#, or can I dump static certificate for all users as below?:

Byte[] certBytes = (Byte[])result.Properties["userCertificate"][0]; 
X509Certificate2 certificate  = new X509Certificate2(certBytes);
result.ChildAttributes.Add(new LCore.LdapAttribute(LCore.UniversalDataType.OctetString, certificate));

the first question is important for me please guide if you can.

any help would be truly appreciated.

Thanks in Advance.

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

No branches or pull requests

1 participant