x509

Bouncy Castle's X509V3CertificateGenerator.SetSignatureAlgorithm marked obsolete. What do I do?

泪湿孤枕 提交于 2019-11-30 07:05:27
I am trying to create a self-signed trusted certificate. I am using Bouncy Castle from nuget, and the answer on this question . This is the code on that page: public static X509Certificate2 GenerateSelfSignedCertificate(string subjectName, string issuerName, AsymmetricKeyParameter issuerPrivKey, int keyStrength = 2048) { // Generating Random Numbers var randomGenerator = new CryptoApiRandomGenerator(); var random = new SecureRandom(randomGenerator); // The Certificate Generator var certificateGenerator = new X509V3CertificateGenerator(); // Serial Number var serialNumber = BigIntegers

Check signature for x509 certificate

耗尽温柔 提交于 2019-11-30 05:29:31
I have: x509 certificate (Base64); String data; Signature of string data (Base64). Is it possible to check signature? My code: bool valid = false; var signature = Convert.FromBase64String(base64Signature); var data = Encoding.UTF8.GetBytes(stringData); var x509 = new X509Certificate2(Convert.FromBase64String(certificate)); var dsa = x509.PublicKey.Key as DSACryptoServiceProvider; if (dsa!=null) valid = dsa.VerifySignature(data, signature); else { var rsa = x509.PublicKey.Key as RSACryptoServiceProvider; if (rsa!=null) valid = rsa.VerifyHash(data, ???, signature); } I don't know what I should

How do I read the public key from a signed C# exe

做~自己de王妃 提交于 2019-11-30 04:25:11
问题 I'm signing a dot net exe using signcode.exe with an spc/pvk combo The file needs to read its own Public Key at runtime in order to verify some data. I've gone down a number of different avenues. I've tried X509Certificate executingCert = X509Certificate.CreateFromSignedFile(exe); executingCert is then null. I'm guessing signcode isn't creating an X509 signed file, though if there's a switch to change that I'm happy to go that way. edited Turns out the above does work.... I had my null check

How to download an EC2 X.509 certificate with an IAM User account?

北战南征 提交于 2019-11-30 04:13:57
问题 Through the AWS Identity and Access Management, I have a user account to the AWS account of my CTO (who is credited with some money). I wanted to use this IAM user account to set up my own instances to ssh to it and run some BeautifulSoup python scripts. However, following this tutorial, when arriving to the part where I need to go on the Security Credentials page, I can't access this page and I'm told I do not have the authorization to view it. I checked my permissions with the IAM Manager,

How to create and install X.509 self signed certificates in Windows 10 without user interaction?

ⅰ亾dé卋堺 提交于 2019-11-30 03:48:28
问题 The problem Create and install temporary certificates to sign code in my development environment. This has to be done with an unattended script (without user interaction). The legacy script Right now, I have this script that creates the certificates using the deprecated tool makecert: makecert -r -pe -n "CN=My CA" -ss CA -sr CurrentUser -a sha256 -cy authority -sky signature -sv MyCA.pvk MyCA.cer certutil -user -addstore Root MyCA.cer certutil -addstore Root MyCA.cer makecert -pe -n "CN=My

Running SSL node.js server with godaddy gd_bundle.crt

假如想象 提交于 2019-11-30 03:17:52
I am having trouble getting my SSL server working with the certificate's from godaddy Using Express: 3.1.0 Below this works with a key/crt that was generated locally / not signed by go daddy (The browser complains but if you add exception it works. var http = require('https'); var privateKey = fs.readFileSync('/var/www/dev/ssl/server.key').toString(); var certificate = fs.readFileSync('/var/www/dev/ssl/server.crt').toString(); var credentials = {key: privateKey, cert: certificate}; var https = http.createServer(credentials, app); With godaddy I am provided an extra file gd_bundle.crt which I

x509: certificate signed by unknown authority - both with docker and with github

寵の児 提交于 2019-11-30 01:53:47
docker build -t oreng/iojs . INFO[0000] Get https://index.docker.io/v1/repositories/library/iojs/images: x509: certificate signed by unknown authority. my Dockerfile is FROM iojs:latest RUN useradd -ms /bin/bash developer WORKDIR /home/developer USER developer Also hub create (using https://github.com/github/hub ) Post https://api.github.com/user/repos: x509: certificate signed by unknown authority VonC As mentioned in crypto/x509/root_unix.go , Go (which is what Docker uses) will check CA certificates in "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. "/etc/pki/tls/certs/ca

Self-signed SSL connection using PyMongo

被刻印的时光 ゝ 提交于 2019-11-30 00:52:24
I'm trying to create a secure SSL connection to MongoDB using PyMongo. The goal is to use this configuration for a Mongo instance running on EC2 to which I can connect with a Python client. For testing, I'm just trying to get the configuration working locally first. My as yet failing attempt can be found here . Short version of what I think is the problem: My client side certificate authority file ca.pem isn't correct. The way I have it, this file is actually identical to the one I'm using server side. Both were created using x509 with openssl , and I suspect that my client side file needs

iPhone TrustStore CA certificates

谁说胖子不能爱 提交于 2019-11-30 00:49:56
Does any of you have a clue how to alter the contents of Security.framework/TrustStore.sqlite3 . It seems as if the iPhone uses it to store trusted CA certificates. I really want my iPod touch to trust my custom certificate. Beside that, does anyone of you know an app (win32) to edit sqlite3 database files (except sqliteman, this one always crashes for me). If you have a webserver configured to serve up digital certificates with the correct mime-type then Safari on the iPhone will add them to the trust store. mime-type for a CA certificate is "application/x-x509-ca-cert" (example here ) When

Certificate generated through CSR signing with BouncyCastle considered untrusted

我的未来我决定 提交于 2019-11-29 23:22:15
问题 I am struggling with the following issue: I have a CSR which I am signing with this code: @Override public X509Certificate signCSR( Reader pemcsr, int validityDays ) throws APIException { try ( PEMParser reader = new PEMParser( pemcsr ) ) { KeyStore keystore = getKeyStore(); Properties cryptoProps = getCryptoProperties(); String caKeyAlias = cryptoProps.getProperty( PROPERTY_KEYSTORE_CA_CERT_ALIAS ); String caKeyPassword = cryptoProps.getProperty( PROPERTY_KEYSTORE_CA_CERT_PASSWORD );