Skip to content

Commit

Permalink
Extension/SetPassword.pm: polish ASN.1 definition
Browse files Browse the repository at this point in the history
Use OCTET STRING in ASN.1 definition instead of STRING,
and add comment on the intended data.
  • Loading branch information
marschap committed Sep 18, 2012
1 parent 11dc556 commit af5aeef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Net/LDAP/Extension/SetPassword.pm
Expand Up @@ -3,20 +3,20 @@ package Net::LDAP::Extension::SetPassword;


require Net::LDAP::Extension; require Net::LDAP::Extension;


$VERSION = "0.03"; $VERSION = "0.04";
@ISA = qw(Net::LDAP::Extension); @ISA = qw(Net::LDAP::Extension);


use Convert::ASN1; use Convert::ASN1;
my $passwdModReq = Convert::ASN1->new; my $passwdModReq = Convert::ASN1->new;
$passwdModReq->prepare(q<SEQUENCE { $passwdModReq->prepare(q<SEQUENCE {
user [0] STRING OPTIONAL, user [0] OCTET STRING OPTIONAL,
oldpasswd [1] STRING OPTIONAL, oldpasswd [1] OCTET STRING OPTIONAL,
newpasswd [2] STRING OPTIONAL newpasswd [2] OCTET STRING OPTIONAL
}>); }>);


my $passwdModRes = Convert::ASN1->new; my $passwdModRes = Convert::ASN1->new;
$passwdModRes->prepare(q<SEQUENCE { $passwdModRes->prepare(q<SEQUENCE {
genPasswd [0] STRING OPTIONAL genPasswd [0] OCTET STRING OPTIONAL
}>); }>);


sub Net::LDAP::set_password { sub Net::LDAP::set_password {
Expand Down

0 comments on commit af5aeef

Please sign in to comment.