Skip Menu |
 

This queue is for tickets about the Crypt-OpenSSL-EC CPAN distribution.

Report information
The Basics
Id: 101780
Status: resolved
Priority: 0/
Queue: Crypt-OpenSSL-EC

People
Owner: Nobody in particular
Requestors: rwfranks [...] acm.org
Cc:
AdminCc:

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



Subject: $eckey->get0_private_key() returns unblessed reference
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-31382-1422391402-456.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 742
Download (untitled) / with headers
text/plain 742b
# Script fragment: #!/usr/bin/perl # use 5.18.4; use Crypt::OpenSSL::Bignum 0.04; use Crypt::OpenSSL::EC 0.6; my $nid = 415; # NID_X9_62_prime256v1 my $group = Crypt::OpenSSL::EC::EC_GROUP::new_by_curve_name($nid); my $eckey = Crypt::OpenSSL::EC::EC_KEY::new() || die; Crypt::OpenSSL::EC::EC_KEY::set_group( $eckey, $group ) || die; Crypt::OpenSSL::EC::EC_KEY::generate_key($eckey) || die; my $bignum = $eckey->get0_private_key(); # <---- unblessed ref print $bignum, "\n"; my $content = $bignum->to_bin; print unpack( 'H*', $content ), "\n"; exit; __END__ # produces: SCALAR(0x9402450) Can't call method "to_bin" on unblessed reference at specimen.pl line 20.
MIME-Version: 1.0
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"
X-Source-Sender: (zulu.localnet) [58.96.35.135]:58148
X-RT-Original-Encoding: utf-8
X-Spam-Score: -4.774
X-Source-Cap: bWlrZW07bWlrZW07Z2F0b3I0MTI5Lmhvc3RnYXRvci5jb20=
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 698B924026E for <cpan-bug+Crypt-OpenSSL-EC [...] hipster.bestpractical.com>; Tue, 27 Jan 2015 20:16:22 -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 nw8p9m2gMQDl for <cpan-bug+Crypt-OpenSSL-EC [...] hipster.bestpractical.com>; Tue, 27 Jan 2015 20:16:19 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 810F62400EC for <bug-Crypt-OpenSSL-EC [...] rt.cpan.org>; Tue, 27 Jan 2015 20:16:19 -0500 (EST)
Received: (qmail 16078 invoked by alias); 28 Jan 2015 01:16:18 -0000
Received: from gateway13.websitewelcome.com (HELO gateway13.websitewelcome.com) (67.18.82.4) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 27 Jan 2015 17:16:16 -0800
Received: by gateway13.websitewelcome.com (Postfix, from userid 5007) id 5377B68307A8E; Tue, 27 Jan 2015 19:16:13 -0600 (CST)
Received: from gator4129.hostgator.com (gator4129.hostgator.com [192.185.4.141]) by gateway13.websitewelcome.com (Postfix) with ESMTP id 4858D68307A63 for <bug-Crypt-OpenSSL-EC [...] rt.cpan.org>; Tue, 27 Jan 2015 19:16:13 -0600 (CST)
Received: from [58.96.35.135] (port=58148 helo=zulu.localnet) by gator4129.hostgator.com with esmtpsa (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from <mikem [...] airspayce.com>) id 1YGHEq-0001Kk-Pg for bug-Crypt-OpenSSL-EC [...] rt.cpan.org; Tue, 27 Jan 2015 19:16:13 -0600
Delivered-To: cpan-bug+Crypt-OpenSSL-EC [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #101780] $eckey->get0_private_key() returns unblessed reference
X-Spam-Check-BY: la.mx.develooper.com
Date: Wed, 28 Jan 2015 11:16:10 +1000
X-Spam-Level:
X-Bwhitelist: no
To: bug-Crypt-OpenSSL-EC [...] rt.cpan.org
Content-Transfer-Encoding: 7Bit
X-Source:
X-Source-Args:
In-Reply-To: <rt-4.0.18-31382-1422391402-748.101780-4-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-4.774 tagged_above=-99.9 required=10 tests=[AWL=1.126, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
X-Source-Dir:
X-RT-Interface: API
References: <RT-Ticket-101780 [...] rt.cpan.org> <rt-4.0.18-31382-1422391402-748.101780-4-0 [...] rt.cpan.org>
Message-ID: <12956064.ddaHloUlQe [...] zulu>
X-Source-Auth: mikem [...] airspayce.com
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - gator4129.hostgator.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - airspayce.com
Organization: AirSpayce Pty Ltd
X-Source-Ip: 58.96.35.135
User-Agent: KMail/4.11.5 (Linux/3.11.10-25-desktop; KDE/4.11.5; i686; ; )
Return-Path: <mikem [...] airspayce.com>
X-RT-Mail-Extension: crypt-openssl-ec
X-Original-To: cpan-bug+Crypt-OpenSSL-EC [...] hipster.bestpractical.com
X-Exim-ID: 1YGHEq-0001Kk-Pg
X-Email-Count: 1
From: Mike McCauley <mikem [...] airspayce.com>
RT-Message-ID: <rt-4.0.18-6965-1422407783-1290.101780-0-0 [...] rt.cpan.org>
Content-Length: 1627
Download (untitled) / with headers
text/plain 1.5k
Thanks for reporting this Dick, This has been fixed and uploaded new verison now, also a similar issue in Crypt-OpenSSL-ECDSA was fixed. Cheers. On Tuesday, January 27, 2015 03:43:23 PM Dick Franks via RT wrote: Show quoted text
> Tue Jan 27 15:43:22 2015: Request 101780 was acted upon. > Transaction: Ticket created by rwfranks@acm.org > Queue: Crypt-OpenSSL-EC > Subject: $eckey->get0_private_key() returns unblessed reference > Broken in: 0.6 > Severity: Important > Owner: Nobody > Requestors: rwfranks@acm.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101780 > > > > # Script fragment: > > #!/usr/bin/perl > # > use 5.18.4; > > use Crypt::OpenSSL::Bignum 0.04; > use Crypt::OpenSSL::EC 0.6; > > my $nid = 415; # NID_X9_62_prime256v1 > my $group = Crypt::OpenSSL::EC::EC_GROUP::new_by_curve_name($nid); > > my $eckey = Crypt::OpenSSL::EC::EC_KEY::new() || die; > Crypt::OpenSSL::EC::EC_KEY::set_group( $eckey, $group ) || die; > Crypt::OpenSSL::EC::EC_KEY::generate_key($eckey) || die; > > > my $bignum = $eckey->get0_private_key(); # <---- unblessed ref > > print $bignum, "\n"; > > my $content = $bignum->to_bin; > > print unpack( 'H*', $content ), "\n"; > > exit; > > __END__ > > # produces: > > SCALAR(0x9402450) > Can't call method "to_bin" on unblessed reference at specimen.pl line 20.
-- Mike McCauley VK4AMM mikem@airspayce.com Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.airspayce.com Phone +61 7 5598-7474


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.