From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id E488F1A40333 for ; Wed, 15 Jun 2016 22:39:16 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 87AEDB5D83E for ; Wed, 15 Jun 2016 23:14:23 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 4200B18CC80D for ; Wed, 15 Jun 2016 23:14:24 +0900 (JST) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 9F80912045E; Wed, 15 Jun 2016 23:13:43 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id C8602120450 for ; Wed, 15 Jun 2016 23:13:40 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=/tSWoonSmu7bn8/r5B6KnN3lQtk=; b=YZf/YKyUPpp7yKePzQ LdGbbm1KTfuW4OJqd4p4yi3455iQd5G/GTd4urQPO3VRekAL9vBh4j3jzpNhhLyw HduzNnywuNCE6RE6LvDpX4dZHgkOqEE/DFmcKWcYdJeiyJEr0WkiuLEim4pzujKF 4g7Iyjoco9OH8oFr9KJSELHtU= Received: by filter0449p1mdw1.sendgrid.net with SMTP id filter0449p1mdw1.23725.5761624B87 2016-06-15 14:12:27.679574382 +0000 UTC Received: from herokuapp.com (ec2-54-87-47-69.compute-1.amazonaws.com [54.87.47.69]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id uAFqYrhOSQuQ4lb__qvDUQ Wed, 15 Jun 2016 14:12:27.810 +0000 (UTC) Date: Wed, 15 Jun 2016 14:12:27 +0000 From: k@rhe.jp To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 50748 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 5600 X-Redmine-Issue-Author: scaligo X-Redmine-Issue-Assignee: X-Redmine-Sender: rhenium X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS79Ckm7AzOKZXseG5gX68cxqsnM7yjjIQViKn WIxdyyJ3ZHrnO+c2yL3ekk7qy8G6HLvi6qmydr2V+LpgIOxidpUxdUt9zBHtc1vki7Pk8cDBBO2Aio SPq/wAoQQnYpVXcAZnd994OPlU8PPIY0BxQU X-ML-Name: ruby-core X-Mail-Count: 76037 Subject: [ruby-core:76037] [Ruby trunk Bug#5600][Closed] OpenSSL::X509::Request can't sign() an OpenSSL::PKey::EC X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #5600 has been updated by Kazuki Yamaguchi. Status changed from Assigned to Closed r55098 (openssl: add OpenSSL::PKey::EC#private? and #public?, 2016-05-21) added OpenSSL::PKey::EC#private?. The code should work now. Please see also #6567. ---------------------------------------- Bug #5600: OpenSSL::X509::Request can't sign() an OpenSSL::PKey::EC https://bugs.ruby-lang.org/issues/5600#change-59238 * Author: Steve Caligo * Status: Closed * Priority: Normal * Assignee: openssl * ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] * Backport: ---------------------------------------- Unlike the PKey::DSA and PKey::RSA classes, PKey::EC provides a private_key?() rather than private?() method and is thus incompatible with the other OpenSSL classes that rely on them, i.e. it makes impossible to generate a certificate signing request: key = OpenSSL::PKey::EC.new('secp521r1') key.generate_key req = OpenSSL::X509::Request.new req.public_key = key req.subject = OpenSSL::X509::Name.parse('CN=whatever') req.sign(key, OpenSSL::Digest::SHA384.new) which produces the error: in `sign': undefined method `private?' for # (NoMethodError) ossl_pkey_ec.c should either: - rb_define_method() the missing private? and public? methods - rename public_key? to public? and private_key? to private? Judging by the source code, this should be present in branch 1.8 as well. -- https://bugs.ruby-lang.org/