x509certificate

Convert x509Certificate into byte[] and reverse

China☆狼群 提交于 2019-12-08 12:46:41
问题 I would to convert X509Certificate into byte[] or String and after obtain an X509Certificate from byte. I have used this code X509Certificate x509cert=Helper.saveCertificate(workgroupId, serialNumber); //x509 to byte[] ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(bos); out.writeObject(x509cert); CertificateSerialization certificateSerialization=new CertificateSerialization(); certificateSerialization.setCertificateByte(bos.toByteArray());

upload x509 certificate to azure application manifest programmatically

﹥>﹥吖頭↗ 提交于 2019-12-08 12:08:34
问题 Is there a way to programmatically upload an x509 certificate created in Visual Studios into Azure application manifest? I followed this post to create the x509 certificate: public static X509Certificate2 GenerateSelfSignedCertificate(string subjectName, string issuerName, AsymmetricKeyParameter issuerPrivKey) { const int keyStrength = 2048; //generate random numbers CryptoApiRandomGenerator randomGenerator = new CryptoApiRandomGenerator(); SecureRandom random = new SecureRandom

X.509 certificate cannot be found by WCF service

混江龙づ霸主 提交于 2019-12-08 10:15:30
问题 I have a WCF service hosted in IIS. Using certmgr.msc I can see my X.509 certificate in Personal -> Certificates but still I get this error: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue 'b0 5f 3f ...'. I changed storelocation, find type... but still the same error appears. I guess IIS cannot use the certificate because of lack of permission. How can I fix this ? 回答1: Right click on

Use JNA to get Local machine Certificate

时光怂恿深爱的人放手 提交于 2019-12-08 09:23:38
问题 I'm trying to get a certificate from local machine Windows store. What a want to get is a certificate in the patth "Certificates(Local Computer) --> Personal --> Certificates". I used this code to access certificate in the path "Certificates - Current User --> Personal --> Certificates NativeLibrary crypt32 = NativeLibrary.getInstance("Crypt32"); Function functionCertOpenSystemStore = crypt32.getFunction("CertOpenSystemStoreA"); Object[] argsCertOpenSystemStore = new Object[] { 0, "MY"};

Set Active Directory “Security Identity Mapping” / “Name Mapping” with C#/Powershell does not add to the right “store”

走远了吗. 提交于 2019-12-08 08:48:39
问题 I have followed this guide: https://blogs.msdn.microsoft.com/adpowershell/2009/04/26/working-with-certificates-in-active-directory-powershell/ The certificate is successfully added to the Published Certificates of the user. But it's not what I really want. Instead I want the certificate to be added to the X509 Certificates of the AD user (Name Mapping / Security Identity Mapping in Active Directory) Security Identity Mapping Is there a way to do this in C# or Powershell? 回答1: So I've resolved

Correct way to import root and intermediate certifiacts in Java cacerts

南楼画角 提交于 2019-12-08 06:17:39
问题 My company has its own ROOT certificate. Using this certificate they signed intermediate certificate. Then we issued CSR for server certificate and signed it with intermediate certificate. What is a correct way to import the ROOT certificate and intermediate in Java cacerts file, in order to be able to establish SSL connection with the server which has server certificate signed by the intermediate ? I used OpenSSL to test certificate chain on the server: openssl s_client -showcerts -connect

Certificate requirements for IdentityServer3?

妖精的绣舞 提交于 2019-12-08 05:21:00
问题 I'm creating a certificate request from my domain controller for use in IdentityServer3 (ID3). In the "Key Usage" section of the Certificate Properties dialog, I see a list of key usages: CRL signing Data encipherment Decipher Only Digital Signature Encipher Only Key agreement Key encipherment Key certificate signing Non repudiation The question is straightforward: what key usages does ID3 require of its signing certificates? I can't find anything in the ID3 documentation besides "use a

“error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure” when generating self signed certificate for Identity Server 4

廉价感情. 提交于 2019-12-08 05:17:33
问题 We're developing a microservices app on Kubernetes. One of the microservices is IdentityServer instance. Initially, I want to test the solution locally on Docker to make sure it works. For this purpose, I want to copy the certificate to appsettings.json. Eventually this value will be replaced by a Kubernetes secret. In my startup class this is how I'm trying to load my certificate: services.AddIdentityServer() .AddSigningCredential(GetIdentityServerCertificate()) .AddConfigurationStore(...

Client certificate is always null

大憨熊 提交于 2019-12-08 05:09:58
问题 I have a certificate installed under Personal as well as Trusted Root Certification Authorities Have tried using this bit of code to post to an endpoint: public void Post() { try { var clientCert = LoadFromStore("MyThumbprint"); var requestHandler = new WebRequestHandler(); requestHandler.ClientCertificates.Add(clientCert); var client = new HttpClient(requestHandler) { BaseAddress = new Uri("https://localhost:44430/") }; var response = client.GetAsync("api/test").Result; response

WCF rejects messages with additional signed elements

主宰稳场 提交于 2019-12-08 04:52:41
问题 We have a WCF 4.0 service over https that allows the client to sign the message to identify themselves. We can then use the cert to give the client the proper rights on the back end. This works fine when a WCF 4.0 client sends the request, but when a non-WCF attempts to send the request, it fails with the following: CryptographicException: Unable to resolve the '#Id-{Guid goes here}' URI in the signature to compute the digest. Upon inspecting the clients request, this failure occurs whenever