def createCertRequest(pkey, digest="<STR_LIT>", **name):
req = crypto.X509Req()<EOL>subj = req.get_subject()<EOL>for key, value in name.items():<EOL><INDENT>setattr(subj, key, value)<EOL><DEDENT>req.set_pubkey(pkey)<EOL>req.sign(pkey, digest)<EOL>return req<EOL>
Create a certificate request.

Arguments: pkey   - The key to associate with the request
           digest - Digestion method to use for signing, default is sha256
           **name - The name of the subject of the request, possible
                    arguments are:
                      C     - Country name
                      ST    - State or province name
                      L     - Locality name
                      O     - Organization name
                      OU    - Organizational unit name
                      CN    - Common name
                      emailAddress - E-mail address
Returns:   The certificate request in an X509Req object