dcsimg
Results 1 to 2 of 2

Thread: Problem making certificates

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2008
    Posts
    965

    Problem making certificates

    I'm planning on making a VB6 program that uses public key encryption, but first I need to generate some certificates. This requires 2 certificates, one must be a CA, and the other must be my own personal certificate. Of course getting a professional CA to send you a certificate costs a lot of money. That's why I need to use makecert to generate both certificates.

    So to generate the first certificate, to make myself a trusted root CA so that I can create my personal certificate, I use this command line
    Code:
    makecert.exe -n "CN=AAAAA" -ss Root -r -cy authority -sky signature -len 2048 -a SHA256
    The command line arguments mean:
    My name is AAAAA
    Put the certificate in Root (trusted root CA section of the Windows certificate store)
    Make it self-signed
    The type of user is certificate authority (can create other keys)
    The type of key is signature (can sign other keys)
    The bitlength of the key is 2048
    Use SHA256 hash for creating signatures

    To generate the second certificate, so that I have one to use for encryption/decryption of data in my VB6 program, I use this command line.
    Code:
    makecert.exe -n "CN=BBBBB" -ss MY -in "CN=AAAAA" -is Root -cy end -sky exchange -len 2048 -a SHA256
    The command line arguments mean:
    My name is BBBBB
    Put the certificate in MY (personal certificates section of Windows certificate store)
    Sign it with the certificate owned by AAAAA
    Look in Root to find the certificate owned by AAAAA
    The type of user is end user (cannot create other keys)
    The type of key is exchange (cannot sign other keys)
    The bitlength of the key is 2048
    Use SHA256 hash for creating signatures (though it can't sign keys, it can sign any other data)


    The problem I'm encountering is with this second command, the one used to create my personal certificate. I keep getting the error "Error: Can't create the key of the subject ('JoeSoft')".
    At no point did I specify the name JoeSoft in any of the command line arguments. So I don't know what's happening here. Right now I'm practically pulling my hair out, because the program makecert.exe isn't behaving the way I'm expecting it to, and I don't know if it's a genuine bug in the program, or if I just am using it incorrectly.

    If anybody on these forums is an expert at using the program makecert.exe, and can tell me what's wrong here, please let me know. I'll be very grateful.

  2. #2
    Hyperactive Member
    Join Date
    Nov 2017
    Posts
    406

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width