tjpatter Absent Member.
Absent Member.
1390 views

C# - Retrieve Universal Password...

I am attempting to write a class for C# that will retrieve a user's UP
(built using the LDAP Libraries for C# SDK)

Here is what I have so far...

private LdapConnection myLdap = new LdapConnection();
private const string NMASLDAP_GET_PASSWORD_REQUEST =
"2.16.840.1.113719.1.39.42.100.13";
private const string NMASLDAP_GET_PASSWORD_RESPONSE =
"2.16.840.1.113719.1.39.42.100.14";

myLdap.SecureSocketLayer = true;

myLdap.Connect(ldapHost, System.Convert.ToInt32(ldapPort));
myLdap.Bind(adminDN, adminPass);

System.IO.MemoryStream encodedData = new
System.IO.MemoryStream();
LBEREncoder encoder = new LBEREncoder();

Asn1Integer nmasver = new Asn1Integer(1);
Asn1OctetString lookupDN = new Asn1OctetString(userDN);

nmasver.encode(encoder, encodedData);
lookupDN.encode(encoder, encodedData);

LdapExtendedOperation myOp = new
LdapExtendedOperation(NMASLDAP_GET_PASSWORD_REQUEST,
SupportClass.ToSByteArray(encodedData.ToArray()));
LdapExtendedResponse response = myLdap.ExtendedOperation(myOp);

MessageBox.Show(response.ToString());

I keep getting a "Invalid NMAS extension version." error... Any ideas
as to how I am supposed to encode / pass the NMAS version info?

Thanks!
Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: C# - Retrieve Universal Password...


Did you ever find a solution to your question? I am trying to write a
class that does the same and am curious as to what you worked out.


--
DTesenair
------------------------------------------------------------------------
DTesenair's Profile: https://forums.netiq.com/member.php?userid=7219
View this thread: https://forums.netiq.com/showthread.php?t=2657

0 Likes
Dieseloreo
New Member.

Re: C# - Retrieve Universal Password...

bump this item, did anyone ever figure this out fully?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.