Understanding Certification Path Construction (OASIS-pki)

Certification path construction is a complex process and is subject to some degree of trial and error. The certification path construction process has not been standardized, and there is very little published information available to help implementers and product evaluators understand the complexities involved. The purpose of this white paper is to clarify issues associated with the certification path construction process and to make recommendations where appropriate

Understanding_Path_construction-DS2[1].

Ref: http://www.oasis-pki.org/pdfs/Understanding_Path_construction-DS2.pdf

Character mapping

When processing intergration or conversion between systems you will more often than not come across differences in character encoding.

An example may be conversion from some characters in latin1 to iso646-se

[code lang=”python”]

# Conversion dictionary

latin1_to_iso646se = { 0xC5:0x5D, 0xC4:0x5B, 0xD6:0x5C, 0xE5:0x7D, 0xE4:0x7B, 0xF6:0x7C, 0xC9:0x40, 0xCB:0x45, 0xE9:0x60, 0xEB:0x65, 0x00:0x20 }

def translate_latin1_iso646se(latin1):
“””
Help translate latin1 to usascii.
:param latin1:
:return:
“””
return chr(latin1_to_iso646se[latin1])

 

def encode_line(line):
l = “”
try:
l = str(line).encode(‘us-ascii’)
except UnicodeDecodeError:
l = “”
r = range(len(line))
for c in range(len(line)):
j = ord(line[c])
if j > 127:
if j in latin1_to_iso646se.keys():
l += translate_latin1_iso646se(j)
else:
print “Skip char {0} {1}”.format(str(j),line[c])
else:
l += line[c]
finally:
return l

# Conversion called

print “latin1_line encoded as iso646se: “, encode_line(latin1_line):

[/code]