pki

CORS with client https certificates

假装没事ソ 提交于 2019-12-04 20:27:23
问题 I have a site with two https servers. One (frontend) serves up a UI made of static pages. The other (backend) serves up a microservice. Both of them happen to be using the same (test) X509 certificate to identify themselves. Individually, I can connect to them both over https requiring the client certificate "tester". We were hiding CORS issues until now by going through an nginx setup that makes the frontend and backend appear that they are same Origin. I have implemented the headers 'Access

Client program to validate server certificate returned by SSL_get_peer_certificate?

我只是一个虾纸丫 提交于 2019-12-04 19:48:32
I have a SSL/TLS client program using OpenSSL in C++ programming language. I am looking for methods to validate server certificate ( X509 ) returned by SSL_get_peer_certificate function call. Also, I have my own CA certificate loaded using SSL_CTX_load_verify_locations function. The CA certified the server certificate. I am able to make SSL session to my server. Now, i want to validate server certificate received during SSL handshake using my own CA. I couldn't find a way to do it in C or C++. #include <iostream> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <resolv

RSA public key encryption openssl

蹲街弑〆低调 提交于 2019-12-04 19:38:58
a question: Vendor says that for some encryption purpose uses PKCS#1 V2.1 OAEP with SHA-256... Is that even possible? I have checked and re-checked openssl and all they have is RSA public key encrypt with OAEP padding which is supposed to be PKCS#1 V2.1 with SHA1 So what can I do? How can I use SHA256 in RSA PUBLIC KEY encryption? IS it even possible? Best regards, EDITED: ANSWER HOW TO USE RSA ENCRYPTION USING OPENSSL OAEP PADDING AND SHA256 DIGEST #include "openssl/rsa.h" #include <openssl/err.h> #define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 154 int RSA_padding_add_PKCS1_OAEP_mgf1_SHA256

Some certificates private keys in Windows-MY not detected

坚强是说给别人听的谎言 提交于 2019-12-04 18:45:16
Using Windows 7, JDK 6 (and 7). I'm trying to get personal certificates stored in Windows MSCAPI key store and it's basic properties (in order to use private key for signing). However some aliases are identified not having private key (isKeyEntry == false) although it acctually has one. Any suggestions how to deal with this "feature"? The P12 file with certificate (already revoked) & private key having this weird "property" can be downloaded from http://download.upce.cz/terena-public.pfx . Password is "password". KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI"); ks.load(null, null

iOS hardware-backed key attestation

╄→尐↘猪︶ㄣ 提交于 2019-12-04 05:38:22
In android there is a way of knowing if the public key from a key pair was generated inside TEE and is, therefore, hardware-backed ( https://source.android.com/security/keystore/attestation ). I cannot find a way to do that in iOS. Does anyone know if there is a way? I am not aware of a directly similar possibility, but if your app lives on a not-jailbroken device you can create keys and store them inside of the Secure Enclave of your iOS device and be sure that they are stored securely and can not be compromised. Note that you can only store 256-bit elliptic curve private keys. You can then

Tomcat SSL: unable to find valid certification path to requested target

江枫思渺然 提交于 2019-12-04 03:43:59
问题 I'm trying to access an url in my application, but I'm getting this error. 1771426 [http-bio-8180-exec-15] ERROR gadget.GadgetValidatorServlet - wsdl.exception.WSInvokerException: wsdl.exception.WSInvokerException: javax.xml.ws.soap.SOAPFaultException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 1771426 [http-bio

iPhone Public-Key Encryption SecKeyEncrypt returns error 9809 (errSSLCrypto)

☆樱花仙子☆ 提交于 2019-12-03 21:16:45
I am trying to use the iPhone's PKI libraries to encrypt a short string (12345678), but I keep getting the error -9809 (i.e. errSSLCrypto) whenever I try to use SecKeyEncrypt. The SecureTransport.h header file describes this error simply as "underlying cryptographic error", which wasn't very meaningful. My code is as follows: - (NSData *)encryptDataWithPublicKey:(NSString *)plainText { OSStatus result = -1; NSData *plainTextData = [plainText dataUsingEncoding:NSASCIIStringEncoding]; size_t plainTextLength = [plainTextData length]; SecTrustRef trustRef; SecTrustResultType trustResult;

Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 解决办法(转)

烈酒焚心 提交于 2019-12-03 17:05:23
使用yum update 更新的时候出现 “Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7” 这样的提示,去CentOS的官网:https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7,找到 CentOS 7 Signing Key 下载到/etc/pki/rpm-gpg/下面,并改名叫RPM-GPG-KEY-CentOS-7,再次更新即可。 ———————————————— 版权声明:本文为CSDN博主「rznice」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/rznice/article/details/84280832 来源: https://www.cnblogs.com/zl1991/p/11804000.html

Importing Thawte trial certificates into a Java keystore

*爱你&永不变心* 提交于 2019-12-03 12:49:26
I'm trying to configure a Tomcat server with SSL. I've generated a keypair thus: $ keytool -genkeypair -alias tomcat -keyalg RSA -keystore keys Next I generate a certificate signing request: $ keytool -certreq -keyalg RSA -alias tomcat -keystore keys -file tomcat.csr Then I copy-paste the contents of tomcat.csr into a form on Thawte's website, asking for a trial SSL certificate. In return I get two certificates delimited with -----BEGIN ... -----END , that I save under tomcat.crt and thawte.crt . (Thawte calls the second certificate a 'Thawte Test CA Root' certificate). When I try to import

PKI authentication for OpenRasta

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm looking at implementing PKI authentication ( 2 way SSL requiring x.509 certificates) for OpenRasta service. Any ideas on how to go about this? Thanks 回答1: I assume that you're using the HttpListener hosting. To enable SSL / Client certifiacates, those settings are set by httpcfg. You can find some information at http://msdn.microsoft.com/en-us/library/ms733791.aspx . More specifically, you should be able to enable SSL with client certificates using httpcfg set ssl -i 0.0.0.0:8012 -h 0000000000003ed9cd0c315bbb6dc1c08da5e6 -f 3 On