Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6612927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:09:22+00:00 2026-05-25T20:09:22+00:00

I have exported a key pair (public and private key) into a single cert

  • 0

I have exported a key pair (public and private key) into a single cert from a Win2k8 server. I then used OpenSSL to convert it to a pem:

openssl pkcs12 -in cert.pfx -out cert.pem -nodes

I then put the contents of the .pem in a MSSQL table, Varchar(max) column type.

Using .NET Framework 4.0 only.

I get the cert like this:

var bytes = Encoding.UTF8.GetBytes("certstringfromdatabase");
var cert = new X509Certificate(bytes, passwordstring);

I get an error “Cryptographic Exception was unhandled Cannot find the specified object.”

Am I converting to byte[] incorrectly? This is for a custom WCF service with TCP binding, I am trying to use the certificate for SSL without touching the internal store (because this will be one day migrated to Azure worker role I can’t use a cert store or filesystem).

Thanks for all ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:09:23+00:00Added an answer on May 25, 2026 at 8:09 pm

    There is much more involved than what I was doing.

    Check out http://www.codeproject.com/KB/security/CertificatesToDBandBack.aspx and that’s that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have exported many times tables from Hive to SQL Server. I never face
I have a DSA private key exported using the DSACryptoServiceProvider.ToXmlString , and I need
I had created key pair on iOS with using SecKeyGeneratePair and then exported keys
I have exported a database and then imported it into a new database. Then
I have an Excel spreadsheet that I have exported from some other program. It
I have a text file exported from a Foxpro (Dos-based) program, but this text
I have a json file exported from phpmyadmin, it looks like this(utf-8 file): [{user_email:
We have some stuff that may be exported into various formats. Currently we have
I have a shed load of 'aps_developer_identity.cer' certificates exported from iPhone Developer portal. They
I have exported my app from eclipse and installed it on my phone. After

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.