ea5a3da csrgen: fix when attribute shortname is lower case

2 files Authored by ftweedal 6 years ago, Committed by cheimes 6 years ago,
    csrgen: fix when attribute shortname is lower case
    
    OpenSSL requires attribute short names ("CN", "O", etc) to be in
    upper case, otherwise it fails to add the attribute.  This can be
    triggered when FreeIPA has been installed with --subject-base
    containing a lower-case attribute shortname (e.g.
    --subject-base="o=Red Hat").
    
    Explicitly convert the attribute type string to an OID
    (ASN1_OBJECT *).  If that fails, upper-case the type string and try
    again.
    
    Add some tests for the required behaviour.
    
    Fixes: https://pagure.io/freeipa/issue/7496
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    
        
file modified
+30 -6