x509

WCF Proxy error Using X509 Certificate

别等时光非礼了梦想. 提交于 2019-12-24 00:06:37
问题 I created a wcf service and could SUCCESSFULLY refer it in client application. But the problem comes when I implement X509 certificate. 1) when I change the service to use x509 Certificate, I couldn't create a proxy as the mex end points are not shown in the browser. So in this case, how should I refer the Service in client app, when the service is secured and mex end points are not exposed? 2) Can I use both message and transport security as Certificate? Will this scenario work for

Extract Common Name from Distinguished Name

时光毁灭记忆、已成空白 提交于 2019-12-23 06:55:01
问题 Is there a call in .NET that parses the CN from a rfc-2253 encoded distinguished name? I know there are some third-party libraries that do this, but I would prefer to use native .NET libraries if possible. Examples of a string encoded DN CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM 回答1: If you are working with an X509Certificate2 , there is a native method that you can use to extract the Simple Name. The Simple Name is equivalent to the Common Name RDN

Reading and Verifying Certificates

只谈情不闲聊 提交于 2019-12-23 03:22:32
问题 Hi I have two certificates, i.e mycert.crt and root.crt. and I need to verfiy if my certificate is signed by root certificate. I am using the following code to do so using the following code but I am getting an error Segmentation fault (core dumped) static int verifyCerti (BYTE *cert1, BYTE *cert2, int certlenght1, int certlenght2); int main (int ac, char **av) { FILE *f_in, *f_in2; BYTE *certBuf, *certBuf2; UINT32 certBufLen,certBufLen2; UINT32 certLen,certLen2; int result; ////////////

Get x509 certificate hash with openssl library

送分小仙女□ 提交于 2019-12-22 18:07:24
问题 I'm currently working on an app, which uses the openssl library (libcrypto) to generate certificates. Now I have to get the hash of a already existing certificate. When I use my Terminal I am able to generate the hash value by using openssl x509 -hash -in cert.pem -noout Output: 01da0e2b This is my code where I try t generate my hash value by using the library in C. X509 *cert = NULL; FILE *fp = fopen(currentCert.UTF8String, "r"); PEM_read_X509(fp, &cert, NULL, NULL); long hash = X509_subject

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

久未见 提交于 2019-12-22 14:55:25
问题 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

DER encoding - How to convert implicit tag to explicit tag

可紊 提交于 2019-12-22 12:39:32
问题 I have an X.509 certificate that contains a set of data with the following IMPLICIT [0] tag: A0 81 C6 (value)... And I have this excerpt from a standards document: The IMPLICIT [0] tag is not used for the DER encoding, rather an EXPLICIT SET OF tag is used. That is, the DER encoding of the EXPLICIT SET OF tag, rather than of the IMPLICIT [0] tag, MUST be included along with the length and content octets of the value. I've done a lot of searching around, but I can't figure out exactly what the

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

╄→尐↘猪︶ㄣ 提交于 2019-12-22 12:21:44
问题 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

How to import an OpenSSL key file into the Windows Certificate Store

雨燕双飞 提交于 2019-12-22 04:11:35
问题 I've got an OpenSSL generated X.509 certificate in PEM format and it's associated key file. This certificate is required for authentication when connecting to a prototype server. This works fine on Linux. I've been using the Microsoft SChannel API to drive SSL/TLS connections on Windows platforms but I want to use the same test certificate. I can right-click on the certificate file and import it into my certificate store but I believe that the private key is not imported with it (even though

Using a X509 Certificate in .Net Compact Framework for Client Authentication HTTPRequest

懵懂的女人 提交于 2019-12-21 14:24:14
问题 I'm working in Windows Mobile 6 and would like to have client authentication when talking to a Apache webserver. I have a certificate in my local certificate store and it should be rather straightforward: X509Store myStore = new X509Store("MY", StoreLocation.CurrentUser); myStore.Open(OpenFlags.ReadOnly); X509Certificate2Collection certificates = myStore.Certificates; X509Certificate2 clientcertificate; foreach (X509Certificate 2certificate in certificates) { clientcertificate = certificate;