Skip to content

Commit

Permalink
Merge pull request #10 from stuwilkins/fix_ca_bug
Browse files Browse the repository at this point in the history
[BUG] Passed CACerts onto utils
  • Loading branch information
mrakitin authored Apr 12, 2021
2 parents 49fb3ec + 1504d9c commit d133254
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion N2SNUserTools/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ def n2sn_search_user():
common_config['server'],
common_config['group_search'].strip('"'),
common_config['user_search'].strip('"'),
args.surname, args.givenname, args.type
args.surname, args.givenname, args.type,
ca_certs_file=common_config.get('ldap_ca_cert', None),
)

print(table)
4 changes: 3 additions & 1 deletion N2SNUserTools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ def n2sn_list_group_users_as_table(server, group_search, user_search,


def n2sn_list_user_search_as_table(server, group_search, user_search,
surname, givenname, user_type):
surname, givenname, user_type,
ca_certs_file):

with ADObjects(server, group_search, user_search,
ca_certs_file=ca_certs_file,
authenticate=False) as ad:
users = ad.get_user_by_surname_and_givenname_dict(
surname, givenname, user_type
Expand Down

0 comments on commit d133254

Please sign in to comment.