Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Private keys

Private keys

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminalgorithmssecuritycryptographyhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sunit5
    wrote on last edited by
    #1

    I am programming a Socket enabled with SSL.while asking for credentials ie AcquireCredentialsHandle returns with SEC_E_INTERNAL_ERROR.I searching in the net i found that similar problem is faced by some people and they were suggested that their private key is not available at the time of getting credentials. I have created Certificate Request using openssl.i used a command to obtain private key and certificate request. openssl> req -newkey rsa:1024 -keyout server.key -nodes -days 365 -out server.csr server.key contains RSA private key server.csr contains the request for certificate. I clicked the Advance option in the Certificate service and pasted the contents in the block .i got the certificate named certnew.cer.i opened this file clicked an option "copy to a file"and marked the option pkcs#7(.P7B).i named the file "FileStore".the file generated is "FileStore.p7b" .Also i have not used installed certificate option since my certificate store provider is a file provider so i did this /*code for file store*/ #define ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING) HCERTSTORE m_hMyCertStore;//handle to certificate store m_hMyCertStore = CertOpenStore(CERT_STORE_PROV_FILENAME_A, ENCODING_TYPE, NULL, NULL, _T("FileStore.p7b")); I want to know that with above procedure i followed whether my private keys are available when my CERT_CONTEXT gets created.and if any other problem please suggest me. Thansx in advance for any suggestion

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups