The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,514 other followers

Archive for the ‘Continuous Integration’ Category

openssl: checking out RSA private key files in .rsa and .pem format

Posted by jpluimers on 2019/03/19

While checking out an issue with the SSH server for ContinuaCI issue (see info below), I wanted to look at the files leading to the issue: .pem and .rsa files with the private key for the SSH server.

So I browsed through my series of openssl related articles to see if I already had made a script better explaining the cryptic openssl command-line parameters. I didn’t have it yet, but it turned out to be really simple:

C:\ProgramData\VSoft\ContinuaCI\SSHD>"C:\Program Files (x86)\Git\usr\bin\openssl.exe" rsa -in server_keypair.rsa
writing RSA key
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
C:\ProgramData\VSoft\ContinuaCI\SSHD>"C:\Program Files (x86)\Git\usr\bin\openssl.exe" rsa -in server_keypair.rsa -text
Private-Key: (1024 bit)
modulus:
    ..:..:..:.....
publicExponent: 35 (0x23)
privateExponent:
    ..:..:..:.....
prime1:
    ..:..:..:.....
prime2:
    ..:..:..:.....
exponent1:
    ..:..:..:.....
exponent2:
    ..:..:..:.....
coefficient:
    ..:..:..:.....
writing RSA key
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
C:\ProgramData\VSoft\ContinuaCI\SSHD>"C:\Program Files (x86)\Git\usr\bin\openssl.exe" rsa -in server_keypair.pem
Enter pass phrase for server_keypair.pem:
unable to load Private Key
2675996:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:529:
2675996:error:23077074:PKCS12 routines:PKCS12_pbe_crypt:pkcs12 cipherfinal error:p12_decr.c:108:
2675996:error:2306A075:PKCS12 routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt error:p12_decr.c:139:
2675996:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:141:
C:\ProgramData\VSoft\ContinuaCI\SSHD>"C:\Program Files (x86)\Git\usr\bin\openssl.exe" rsa -in server_keypair.pem -passin pass:password
unable to load Private Key
2675996:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:529:
2675996:error:23077074:PKCS12 routines:PKCS12_pbe_crypt:pkcs12 cipherfinal error:p12_decr.c:108:
2675996:error:2306A075:PKCS12 routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt error:p12_decr.c:139:
2675996:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:141:

The command-lines use the [WayBack]rsa tool with:

  • the -in parameter
  • (for the first file) the -text parameter to dump it into human readable form
  • (for the second file) the -passin parameter with a [WayBackpass phrase argument pass:password.

The server_keypair.pem file (having the header -----BEGIN ENCRYPTED PRIVATE KEY----- and footer -----END ENCRYPTED PRIVATE KEY-----) was a password protected RSA private key where somehow ContinuaCI had the wrong password for.

I’m not sure it’s a good idea that the server_keypair.pem file has not password at all.

Read the rest of this entry »

Posted in Continua CI, Continuous Integration, Development, OpenSSL, Power User, Security, Software Development | Leave a Comment »

msbuild: /p: or /property: but be ware of the equals sign

Posted by jpluimers on 2019/02/27

From [WayBackHow do I pass this common property to MSBuild using TeamCity? – Stack Overflow, I learned you can pass properties to msbuild using the /p:propertyname=value or /property:propertyname=value syntax (where you can quote "value" when needed):

I am using the TeamCity Visual Studio runner. I want to add a setting that is not accessible from Visual Studio./Property:FileAlignment=4096I typed that directly into the build step “Command line

However, when passing these parameters to batch files first, be aware that they can strip equals signs from parameters: [WayBack] windows – Preserving “=” (equal) characters in batch file parameters – Stack Overflow

I bumped into this when passing properties to https://bitbucket.org/jeroenp/wiert.me/src/tip/Run-Dependend-rsvars-From-Path.bat

–jeroen

Posted in Batch-Files, Continuous Integration, Development, msbuild, Scripting, Software Development | Leave a Comment »

If you are looking for good Travis engineers, look at the #TravisAlums hashtag on Twitter

Posted by jpluimers on 2019/02/23

Idera is laying of a lot of really good Travis engineers.

If you want to hire them, then follow the [Archive.is] #TravisAlums hashtag on Twitter

Via: [WayBackJosé León Serna on Twitter: “Idera acquired Embarcadero Technologies in 2016 and fired almost all its R&D (150+ people in Spain, Russia, US, etc) so not sure why #TravisAlums are surprised, that’s what they do, that’s their business model.”

–jeroen

Posted in Continuous Integration, Development, Software Development, TravisCI | Leave a Comment »

Reminder to self: make a start for an XSD that validates Delphi dproj files

Posted by jpluimers on 2018/11/07

Below are a few interesting things from this thread [WayBack] Any idea why Delphi (At least since Seattle) does this to Dproj filesand… – Tommi Prami – Google+.

It’s likely that the WordPress system deleted parts between angle brackets because it thinks it’s invalid HTML and WordPress is PHP.

Anyhow: maybe by now I’ve found time for creating an XSD for .dproj files in addition to the one I mentioned yesterday for the .groupproj files: Validating a nested XML element with an empty namespace using XSD – Stack Overflow.

Oh and in the mean time for various Delphi versions, there is a (binary, because it uses some commercially licensed parts) [WayBackDproj changed or not changed? Normalize it! | The Art of Delphi Programming.

Files and directories I need to research:

In the mean time, QualityPortal indicates that:

Achim Kalwa:
That is a long living bug: https://quality.embarcadero.com/browse/RSP-11308
Still exists in Berlin Update 2.

Jeroen Wiert Pluimers
For more than a decade, the IDE rewriting dproj files in different order/indentation/spacing, properties appearing/disappearing in DFM files and writing DFM files despite no changes have driven me even more nuts than I was.

Walter Prins
+Jeroen Wiert Pluimers Yes. Given that .dproj is XML I’ve been almost annoyed enough to look at making some kind of pre-checkin script to force sort things to try and avoid the issue. Almost… Edit: Ah, just checked that RSP, which references this: https://github.com/joshkel/RadCli Seems someone has already done it.

Lübbe Onken
Did you try tidy_proj +Walter Prins? For me it fails with a “Unicode Encode Error” when I try to write an output file. In my case this is caused by German umlauts in the excluded bpl section descriptions. Changing the umlauts to something low-ascii allows tidy_proj to finish.

Walter Prins
+Lübbe Onken No, but I have just done so. Unicode bites again. To fix that error, change line 125 from:

print(proj.toxml())

to:

print(proj.toxml().encode(‘utf-8’))

Note: This will likely not display correctly if you allow the output to go to the console but will ensure it is correct if redirected back to file.

Edit: Ha, I was about to go report this issue ad suggest this fix, but I see you’ve already suggested essentially the same fix. ;)

Jeroen Wiert Pluimers’s profile photo
Jeroen Wiert Pluimers
+Walter Prins interesting tool! Do you know of a tool that can downgrade .dproj files so you can use them with older Delphi versions? (the opposite of what the IDE does)?

Or someone that has written more than my XSD on .dproj files? My one is so small that’s hardly a real attempt. https://wiert.me/2013/08/31/delphi-first-try-on-an-xsd-for-groupproj-files/

Walter Prins
+Jeroen Wiert Pluimers No, but interesting idea. I suppose you’re probably aware that the JEDI JCL/JVCL takes a somewhat similar (ish) related approach, in that it generates project and package files that are compatible with every desired version of Delphi from minimalist (XML) template files. Every so often I think it might be worth looking whether one can re-use the code from there easily but haven’t gotten around to it. Always something else to do first. :/

Jeroen Wiert Pluimers
+Walter Prins no I didn’t. Where should I start reading on that minimalist template approach?

Walter Prins
+Jeroen Wiert Pluimers Sorry I see I missed out the word installer in my comment: It’s the Jedi JCL/JVCL installers that uses xml templates etc.

But the point stands: I guess it should be (perhaps) possible to reuse its infrastructure for ones own projects, though as I say I keep meaning to look into this but haven’t really done so.

(BTW I’m assuming you are familiar with the JCL/JVCL and in in particular their installers that bootstrap from source code? If not then perhaps my comments may not be that useful?)

Anyway, not sure if or where there’s particular documentation about this (kind of doubt it), but if you have the JCL/JVCL installed somewhere, then first of all have a look at the “xml” folders e.g. “<jclroot>\jcl\packages\xmls” and “<jvclroot>\jvcl\packages\xml”.

These files appear to define projects and packages in a seemingly abstract/somewhat minimal way using XML. This seemingly is then used to automatically produce .dproj and .dpk files which are placed in e.g. “<jclroot>\jcl\packages\dXX” and “<jvclroot>\jvcl\packages\dXX” where dXX corresponds to a folder for each of the supported Delphi versions and compiled/used during installation.

Having just looked into this briefly a bit further as a result of this conversation: Key units here (in the case of JVCL) seems to be “<jvclroot>\devtools\PackagesGenerator\PackageGenerator.pas”, “<jvclroot>\install\JVCLInstall\PackageUtils.pas” and “<jvclroot>\devtools\common\PackageInformation.pas” (used predictably by <jvclroot>\JVCLInstall.dproj)

(Additionally, having looked at this a bit more closely, it also appears that the JCL does not actually replace all or even most of its .dproj and .dpk files after all, but ships version specific .dproj and .dpk files in most cases, though the JVCL does appear to mostly do so. )

Edit: The JCL also has this interesting sounding unit “jclroot>\source\windows\JclMsBuild.pas” which appears to be an MSBuild project file parser…

–jeroen

Posted in Continuous Integration, Delphi, Development, msbuild, Software Development, XML, XML/XSD, XSD | Leave a Comment »

If you like Oz: VSoft is hiring – .NET/Full Stack Developer, local or remote

Posted by jpluimers on 2018/03/07

VSoft in Oz (of Coninua CI and FinalBuilder fame) is hiring: [WayBack] We’re hiring – .NET/Full Stack Developer, local or remote – Vincent Parrett – Google+.

The job is on LinkedIn, but that site does not like to be archived in the WayBack Machine or Archive.is, so here it is:

Job description

We are looking for a talented .NET/Full Stack developer to help our team ramp up product development.

This isn’t a ‘run of the mill’ data entry project, there are significant technical challenges, so we are looking for a developer at the top of their game. You will need a keen interest in DevOps.

For this role it is essential that you have the following skills and a minimum of 2 years development experience.

Required skills

  • Excellent C# (VS2017).
  • Excellent HTML, CSS and JavaScript/TypeScript.
  • ASP.NET MVC.
  • SQL/Database (any).
  • Version Control (any).

Bonus skills/experience

  • .NET Core
  • React
  • Webpack.
  • Nancy.
  • NHibernate.
  • REST API design.
  • DevOps

About You

You will be a software developer with a strong attention to detail. You should enjoy a challenge, and be able to hit the ground running and be producing code in the first few days. You will be comfortable working as part of a team, or alone with minimal supervision and have excellent spoken and written English.About UsWe’re passionate about software development, in particular, CI/CD/DevOps. We are small team of experienced, smart developers who are very focused on customer satisfaction.All our developers have fast machines, multiple monitors, Herman Miller chairs, electric sit/stand desks, free tee/coffee, parking etc. Our office is in the Phillip business district in Canberra. Remote work is possible for the right candidate.SalarySalary is negotiable (commensurate with experience) – let us know your expectations when applying.

The position is full time, preferably on site at our office in Phillip, Canberra, close to Woden Plaza and public transport, with a great cafe downstairs!

Application Process

We are looking for someone to start asap, so we won’t drag this out. Send us your resume (pdf only). If you have any pet open source projects (or contribute to open source projects), tell us about your involvement (include links!). If you have a github or bitbucket account, let us know your handle (saves us searching for it ourselves!).If you are selected for interview, be prepared to write some code (a small demo project < 30 minutes). If you have something you are working on that you can show and tell, by all means bring your laptop! We will expect that you are at least familiar with our products (Continua CI).

NOTE: You must have the right to live and work in Australia (unless working remotely, outside of Australia).

–jeroen

 

Posted in .NET, Continua CI, Continuous Integration, Development, Software Development | Leave a Comment »

 
%d bloggers like this: