x509

How to sign xml with X509 cert, add digest value and signature to xml template

风格不统一 提交于 2019-12-06 12:13:54
I am quite new to C# and especially new to Signing with X509. I have an xml template in which I have to add the certificate used (done) and sign the timestamp (TS-1), the binary security token and the body (id-1). Furthermore, I need to write (e.g. replace placeholders) with the digest value of these 3 elements and add the signature value. However, I do not really understand the concept, e.g. how to do this. I read a couple of websites, e.g. signing a xml document with x509 certificate but I cannot adapt the code to my problem. Here is what I tried: public static string SignXml(string template

How to make X.509 certificate?

六月ゝ 毕业季﹏ 提交于 2019-12-06 11:39:27
问题 I am trying to make a X.509 certificate. I am using makecert.exe to make this. I use this command to make my X.509 certificate makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=MyServerCert -sky exchange –pe But i don`t know there X.509 certificate is storeing. I need to use this X.509 certificate in my c# code. The code is : host.Credentials.ServiceCertificate.Certificate = new X509Certificate2("MyServerCert.p12", "password"); But i don`t know what is password and it throw this exception

How to enable SSL over ActiveMQ using C client

家住魔仙堡 提交于 2019-12-06 11:21:38
问题 I have configured [ActiveMQ]http://activemq.apache.org/) with ssl context by following RedHat's SSL/TLS Tutorial. Then I converted the client keystore file in ActiveMQ/conf directory to .pem format. For this I followed Converting a Java Keystore into PEM Format on Stack Overflow. After both steps I tried with an Eclipse Paho MQTT C Client to connect to a ActiveMQ Broker over SSL, but it returns status -1. The code is as follows: MQTTClient client; MQTTClient_connectOptions conn_opts

Automate export x509 certificate w/chain from Server 2008 R2 to a p7b file WITHOUT external tools?

霸气de小男生 提交于 2019-12-06 08:59:47
问题 I manage the Domain Controllers centrally, but the site admins manage their own digital senders locally. I can easily export an X509 certificate (private key not needed) with the whole chain from a Windows Server 2008 R2 Domain Controller to a p7b file through the wizard: ~~~~~~~~~~~~~~~~~ ...5. The Certificate Export Wizard opens. Click Next. In the Export File Format dialog box, do the following: a. Select Cryptographic Message Syntax Standard – PKCS #7 Certificates (.P7B). b. Check Include

Use in memory certificate for client authentication

大城市里の小女人 提交于 2019-12-06 06:42:12
问题 I have a non-exportable certificate in my windows box which works fine with IE and Chrome when I try to access websites. I would like to be able to use this certificate from a Go CLI application to access a HTTPS URI that requires client certificate authentication but also a non standard CA cert which I suppose I need to add to the request if its not already there. Some code example would be appreciated since documentation I found concerning calls do not have any. I suppose that I would use

Set notBefore of x509 certificate in the past using OpenSSL and PHP

本秂侑毒 提交于 2019-12-06 06:31:35
The internal clock of my server that signs certificate requests is apparently a few seconds faster that the client clocks. Therefore I need to set the "Not before" in the certificate a few seconds in the past when I sign a csr. I do not want to set back the internal clock of the server since that seems like a hackish solution. Currently I sign the csr and generate a certificate using: $usercert = @openssl_csr_sign($csr, $cacert, $privkey, intval(CERT_VAL_PERIOD), $cnf); Is there any way to achieve what I want by modifying openssl.cnf or using a different signing function? Using phpseclib's

X509 parsing error, 'negative serial number' while pulling repository

筅森魡賤 提交于 2019-12-06 05:57:35
Our server access internet through a proxy. When I try to run a pull command such as sudo docker run -t -i ubuntu:14.04 /bin/bash I get the below error: Get https://index.docker.io/v1/repositories/ubuntu/images: tls: failed to parse certificate from server: x509: negative serial number The wget command wget -S -d -O - https://get.docker.io yields the below output: Setting --output-document (outputdocument) to - DEBUG output created by Wget 1.13.4 on linux-gnu. URI encoding = UTF-8' URI encoding = UTF-8' --2014-08-27 17:13:46-- https://get.docker.io/ Connecting to :... connected. Created socket

Modifying X509 certificate

痴心易碎 提交于 2019-12-06 05:54:38
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 5 years ago . I want to show that if I modify one bit or byte from a given X509 certificate the signature verification results false (because this modification results different hash value from the certificate). I'm stuck in the case that how to do the modification on the certificate using getTBSCertificate() method. My following code does the verification process

How to use X509_verify()

江枫思渺然 提交于 2019-12-06 05:44:26
问题 How can we use X509_verify(). I have two certificates. The first certificate is the Root Certificate which signed the next certificate (which is my Certificate). So I want to check if my certificate is signed by the root certificate using x509_verify() in C++. My goal is to keep the code simple and Understandable so I can also put it online. 回答1: Signature of X509_verify is int X509_verify(X509 * x509, EVP_PKEY * pkey); Suppose of you have root certificate in root and your certificate in

“an introduction to openssl programming.” article. expired certificates

喜你入骨 提交于 2019-12-06 05:15:17
问题 I am newbie in openSSL library and PKI . I have simple question for openSSL experts. Does anybody know how to create certificates for code samples in this article "An Introduction to OpenSSL programming (Part I/II)" by Eric Rescorla www.rtfm.com/openssl-examples/part1.pdf www.rtfm.com/openssl-examples/part2.pdf I have downloaded source code from http://www.rtfm.com/openssl-examples The problem is that certificates are expired and I don't know how to create new root certificate. How to create