Skip Menu |
 

This queue is for tickets about the Net-SSLeay CPAN distribution.

Report information
The Basics
Id: 74528
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Net-SSLeay

People
Owner: MIKEM [...] cpan.org
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CTX_use_PKCS12_file does not work on MS Windows
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 370
The fix for CTX_use_PKCS12_file(ctx, file, password) is easy:

- fp = fopen (file, "r");
+ fp = fopen (file, "rb");

The reason is that pkcs12 is binary file and opening it in "r" mode means "text mode" which ends in loading some damaged data - at least on MS Windows.

--
kmx
From mikem [...] open.com.au Mon Jan 30 16: 34:17 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-1.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-17363-1327926984-1027.74528-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-74528 [...] rt.cpan.org> <rt-3.8.HEAD-17363-1327926984-1027.74528-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: amavisd-new at example.com
Message-ID: <1590010.0ATg076Q1b [...] zulu>
Content-Type: text/plain; charset="utf-8"
Organization: Open System Consultants
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 35A402414DC for <cpan-bug+Net-SSLeay [...] hipster.bestpractical.com>; Mon, 30 Jan 2012 16:34:17 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ohER2s+buusZ for <cpan-bug+Net-SSLeay [...] hipster.bestpractical.com>; Mon, 30 Jan 2012 16:34:15 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id A89CD24143B for <bug-Net-SSLeay [...] rt.cpan.org>; Mon, 30 Jan 2012 16:34:15 -0500 (EST)
Received: (qmail 26688 invoked by uid 103); 30 Jan 2012 21:34:15 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 30 Jan 2012 21:34:15 -0000
Received: from mail.open.com.au (HELO mail.open.com.au) (67.192.60.197) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Mon, 30 Jan 2012 13:34:12 -0800
Received: from localhost (localhost [127.0.0.1]) by mail.open.com.au (Postfix) with ESMTP id 2775D238893 for <bug-Net-SSLeay [...] rt.cpan.org>; Mon, 30 Jan 2012 15:34:10 -0600 (CST)
Received: from mail.open.com.au ([127.0.0.1]) by localhost (228755-app1.open.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iFA0OHRyeQdn for <bug-Net-SSLeay [...] rt.cpan.org>; Mon, 30 Jan 2012 15:34:04 -0600 (CST)
Received: from zulu.localnet (135.35.96.58.static.exetel.com.au [58.96.35.135]) by mail.open.com.au (Postfix) with ESMTP id A3F00238029 for <bug-Net-SSLeay [...] rt.cpan.org>; Mon, 30 Jan 2012 15:34:04 -0600 (CST)
Delivered-To: cpan-bug+Net-SSLeay [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #74528] CTX_use_PKCS12_file does not work on MS Windows
User-Agent: KMail/4.7.2 (Linux/3.1.0-1.2-desktop; KDE/4.7.2; i686; ; )
Return-Path: <mikem [...] open.com.au>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Net-SSLeay [...] hipster.bestpractical.com
X-RT-Mail-Extension: net-ssleay
Date: Tue, 31 Jan 2012 07:34:03 +1000
X-Spam-Level:
To: bug-Net-SSLeay [...] rt.cpan.org
Content-Transfer-Encoding: 7Bit
From: Mike McCauley <mikem [...] open.com.au>
RT-Message-ID: <rt-3.8.HEAD-17369-1327959257-1521.74528-0-0 [...] rt.cpan.org>
Content-Length: 1356
Download (untitled) / with headers
text/plain 1.3k
Hi, Thanks. Adopted. On Monday, January 30, 2012 07:36:25 AM you wrote: Show quoted text
> Mon Jan 30 07:36:24 2012: Request 74528 was acted upon. > Transaction: Ticket created by KMX > Queue: Net-SSLeay > Subject: CTX_use_PKCS12_file does not work on MS Windows > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: kmx@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74528 > > > > The fix for CTX_use_PKCS12_file(ctx, file, password) is easy: > > - fp = fopen (file, "r"); > + fp = fopen (file, "rb"); > > The reason is that pkcs12 is binary file and opening it in "r" mode means > "text mode" which ends in loading some damaged data - at least on MS > Windows. > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.