Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - echodreamz

Pages: [1]
1
Encryption / Re: PFX - Extract RSA private key / certificate
« on: May 24, 2018, 04:07:30 PM »
Code: [Select]
           
            Chilkat.PrivateKey privKey = null;
            Chilkat.Cert cert = pfx.GetCert(0);

            cert.ExportCertPemFile(@"C:\cert.crt");
            privKey = cert.ExportPrivateKey();

            privKey.SaveRsaPemFile(@"C:\rsapem.key");
            privKey.SavePkcs1File(@"C:\pkcs1.key");
            privKey.SavePemFile(@"C:\pem.key");

            Console.WriteLine(privKey.GetRsaPem());

I noticed that SaveRsaPemFile and GetRsaPem have different outputs. The file has BEGIN PRIVATE KEY, while the GetRsaPem has BEGIN RSA PRIVATE KEY

2
Encryption / PFX - Extract RSA private key / certificate
« on: May 24, 2018, 03:32:34 PM »
Is it possible with the PFX portion of the .net library to extract the RSA private key as well as the website specific certificate? Currently we have to use 3 OpenSSL commands...

Extract the private key
Code: [Select]
openssl pkcs12 -in filename.pfx -nocerts -nodes -out key.pem
Convert to the older RSA format
Code: [Select]
openssl pkcs8 -in key.pem -out rsakey.pem
Extract the certificate
Code: [Select]
openssl pkcs12 -in filename.pfx -nokeys -out cert.pem
Would be great if we could do this directly with code instead of relying on starting processes.

3
Email Protocols / Amazon SES SMTP just stopped working over the weekend
« on: December 04, 2017, 03:41:23 PM »
No changes occurred on our end, but it is now returning that our credentials are wrong, however they are not.

Code: [Select]
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-2638130967 DglLx6sFLLTHXvJWc4i0
EHLO WSP
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-STARTTLS
250-AUTH PLAIN LOGIN
250 Ok
AUTH LOGIN
530 Must issue a STARTTLS command first
EHLO {REMOVED}
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-STARTTLS
250-AUTH PLAIN LOGIN
250 Ok
STARTTLS
220 Ready to start TLS
EHLO {REMOVED}
250-email-smtp.amazonaws.com
250-8BITMIME
250-SIZE 10485760
250-STARTTLS
250-AUTH PLAIN LOGIN
250 Ok
AUTH LOGIN
334 VXNlcm5hbWU6
{REMOVED}
334 UGFzc3dvcmQ6
{PasswordOrCredentials}
535 Authentication Credentials Invalid
QUIT
221 Bye

Code: [Select]
ChilkatLog:
CloseSmtpConnection:
DllDate: Nov 27 2017
ChilkatVersion: 9.5.0.70
UnlockPrefix: *MAILQ
Architecture: Little Endian; 64-bit
Language: .NET 4.6 VS2017 / x64
VerboseLogging: 0
sendCmdToSmtp:
SmtpCmdSent: QUIT
--sendCmdToSmtp
readSmtpResponse:
SmtpCmdResp: 221 Bye
--readSmtpResponse
--CloseSmtpConnection
--ChilkatLog

I checked the SMTP username being sent (according to the session log) and the username (per the base64 decode) is correct. However the password I cannot verify as it is not in the logs. However I've made sure they are correct in the settings. Our billing system (PHP-based), using the same credentials has no issues. Changed over to another library and emails send without issues.

Using Chilkat 9.5.0.70. (.net).

Any help would be awesome! Thanks!

Pages: [1]