Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-devtools / python / files / python-ansible / python-ansible-crypto.py-allow-the-constraint-value-to-be-lower-cas.patch
1 From 1efb4cc41494201f6773ce2e92a562c96708dcb7 Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Wed, 26 May 2021 14:17:07 +0800
4 Subject: [PATCH] crypto.py: allow the constraint value to be lower case
5
6 Upstream-Status: Inappropriate [poky-stx specific]
7
8 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9 ---
10  lib/ansible/module_utils/crypto.py | 4 ++--
11  1 file changed, 2 insertions(+), 2 deletions(-)
12
13 diff --git a/lib/ansible/module_utils/crypto.py b/lib/ansible/module_utils/crypto.py
14 index 9b579a8..550ec26 100644
15 --- a/lib/ansible/module_utils/crypto.py
16 +++ b/lib/ansible/module_utils/crypto.py
17 @@ -1813,9 +1813,9 @@ def cryptography_get_basic_constraints(constraints):
18      if constraints:
19          for constraint in constraints:
20              if constraint.startswith('CA:'):
21 -                if constraint == 'CA:TRUE':
22 +                if constraint == 'CA:TRUE' or constraint == 'CA:true':
23                      ca = True
24 -                elif constraint == 'CA:FALSE':
25 +                elif constraint == 'CA:FALSE' or constraint == 'CA:false':
26                      ca = False
27                  else:
28                      raise OpenSSLObjectError('Unknown basic constraint value "{0}" for CA'.format(constraint[3:]))
29 -- 
30 2.7.4
31