From woelk.f at web.de Sun Feb 27 03:32:25 2022 From: woelk.f at web.de (Felix Woelk) Date: Sun, 27 Feb 2022 09:32:25 +0100 Subject: [Cryptography-dev] Alpine: pip install cryptography --no-binary cryptography generates wheel Message-ID: <2ADB161F-430A-45CE-8892-0B805188DA33@web.de> Hi there, I am using cryptography in a docker container with alpine linux. The container creation takes quite a long time and the majority of the time (approx 5 minutes) is consumed by building the wheel for the collected packages cryptography. Building wheels for collected packages: cryptography I found the command pip install cryptography --no-binary cryptography in the documentation to prevent building the wheel, but it does not work as expected. Is there anything that can be done to prevent building the wheel? I unsuccessfully tried: * pip install cryptography --no-binary=cryptography * pip install ?no-cache-dir cryptography * pip install ?no-cache-dir --no-binary :all: cryptography Testet with cryptography-36.0.1 Thanks for the reply All the best Felix -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.gaynor at gmail.com Sun Feb 27 08:02:33 2022 From: alex.gaynor at gmail.com (Alex Gaynor) Date: Sun, 27 Feb 2022 08:02:33 -0500 Subject: [Cryptography-dev] Alpine: pip install cryptography --no-binary cryptography generates wheel In-Reply-To: <2ADB161F-430A-45CE-8892-0B805188DA33@web.de> References: <2ADB161F-430A-45CE-8892-0B805188DA33@web.de> Message-ID: --no-binary prevents downloading a pre-built wheel. However, pip will always build a wheel internally from an sdist, that's part of how it installs a package. What are you actually trying to do? Alex On Sun, Feb 27, 2022 at 8:00 AM Felix Woelk wrote: > > Hi there, > > I am using cryptography in a docker container with alpine linux. The container creation takes quite a long time and the majority of the time (approx 5 minutes) is consumed by building the wheel for the collected packages cryptography. > > Building wheels for collected packages: cryptography > > I found the command > > pip install cryptography --no-binary cryptography > > in the documentation to prevent building the wheel, but it does not work as expected. > > Is there anything that can be done to prevent building the wheel? > > I unsuccessfully tried: > > * pip install cryptography --no-binary=cryptography > * pip install ?no-cache-dir cryptography > * pip install ?no-cache-dir --no-binary :all: cryptography > > Testet with cryptography-36.0.1 > > Thanks for the reply > > All the best > > Felix > > > > > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev at python.org > https://mail.python.org/mailman/listinfo/cryptography-dev -- All that is necessary for evil to succeed is for good people to do nothing. From fk.smoh at gmail.com Mon Feb 28 09:40:36 2022 From: fk.smoh at gmail.com (Seyed Mohammad Fakhraie) Date: Mon, 28 Feb 2022 18:10:36 +0330 Subject: [Cryptography-dev] Validate SSH key Message-ID: Greetings, I'm receiving encoded SSH keys from the user which I need to validate. Does pyopenssl have a function for validating SSH keys? From alex.gaynor at gmail.com Mon Feb 28 09:43:34 2022 From: alex.gaynor at gmail.com (Alex Gaynor) Date: Mon, 28 Feb 2022 09:43:34 -0500 Subject: [Cryptography-dev] Validate SSH key In-Reply-To: References: Message-ID: What does it mean to you to validate an SSH key? pyOpenSSL does not have any functions for interacting with SSH-formatted keys. cryptography has a function for parsing them: https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#openssh-public-key Alex On Mon, Feb 28, 2022 at 9:40 AM Seyed Mohammad Fakhraie wrote: > > Greetings, > I'm receiving encoded SSH keys from the user which I need to validate. > Does pyopenssl have a function for validating SSH keys? > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev at python.org > https://mail.python.org/mailman/listinfo/cryptography-dev -- All that is necessary for evil to succeed is for good people to do nothing. From fk.smoh at gmail.com Mon Feb 28 09:57:31 2022 From: fk.smoh at gmail.com (Seyed Mohammad Fakhraie) Date: Mon, 28 Feb 2022 18:27:31 +0330 Subject: [Cryptography-dev] Validate SSH key In-Reply-To: References: Message-ID: Hey Alex, Thanks for getting back. My bad. I meant SSH public keys. I want to make sure that the string which I'm receiving is a valid SSH public key. On Mon, Feb 28, 2022 at 6:13 PM Alex Gaynor wrote: > > What does it mean to you to validate an SSH key? > > pyOpenSSL does not have any functions for interacting with > SSH-formatted keys. cryptography has a function for parsing them: > https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#openssh-public-key > > Alex > > On Mon, Feb 28, 2022 at 9:40 AM Seyed Mohammad Fakhraie > wrote: > > > > Greetings, > > I'm receiving encoded SSH keys from the user which I need to validate. > > Does pyopenssl have a function for validating SSH keys? > > _______________________________________________ > > Cryptography-dev mailing list > > Cryptography-dev at python.org > > https://mail.python.org/mailman/listinfo/cryptography-dev > > > > -- > All that is necessary for evil to succeed is for good people to do nothing. > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev at python.org > https://mail.python.org/mailman/listinfo/cryptography-dev From alex.gaynor at gmail.com Mon Feb 28 10:01:24 2022 From: alex.gaynor at gmail.com (Alex Gaynor) Date: Mon, 28 Feb 2022 10:01:24 -0500 Subject: [Cryptography-dev] Validate SSH key In-Reply-To: References: Message-ID: Sure, then the parse function in cryptography should do what you want -- it will either return a public key or raise an exception. Alex On Mon, Feb 28, 2022 at 9:57 AM Seyed Mohammad Fakhraie wrote: > > Hey Alex, > Thanks for getting back. My bad. I meant SSH public keys. I want to > make sure that the string which I'm receiving is a valid SSH public > key. > > On Mon, Feb 28, 2022 at 6:13 PM Alex Gaynor wrote: > > > > What does it mean to you to validate an SSH key? > > > > pyOpenSSL does not have any functions for interacting with > > SSH-formatted keys. cryptography has a function for parsing them: > > https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#openssh-public-key > > > > Alex > > > > On Mon, Feb 28, 2022 at 9:40 AM Seyed Mohammad Fakhraie > > wrote: > > > > > > Greetings, > > > I'm receiving encoded SSH keys from the user which I need to validate. > > > Does pyopenssl have a function for validating SSH keys? > > > _______________________________________________ > > > Cryptography-dev mailing list > > > Cryptography-dev at python.org > > > https://mail.python.org/mailman/listinfo/cryptography-dev > > > > > > > > -- > > All that is necessary for evil to succeed is for good people to do nothing. > > _______________________________________________ > > Cryptography-dev mailing list > > Cryptography-dev at python.org > > https://mail.python.org/mailman/listinfo/cryptography-dev > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev at python.org > https://mail.python.org/mailman/listinfo/cryptography-dev -- All that is necessary for evil to succeed is for good people to do nothing. From fk.smoh at gmail.com Mon Feb 28 10:15:15 2022 From: fk.smoh at gmail.com (Seyed Mohammad Fakhraie) Date: Mon, 28 Feb 2022 18:45:15 +0330 Subject: [Cryptography-dev] Validate SSH key In-Reply-To: References: Message-ID: Thanks a lot Alex. Best, Seyed On Mon, Feb 28, 2022 at 6:32 PM Alex Gaynor wrote: > > Sure, then the parse function in cryptography should do what you want > -- it will either return a public key or raise an exception. > > Alex > > On Mon, Feb 28, 2022 at 9:57 AM Seyed Mohammad Fakhraie > wrote: > > > > Hey Alex, > > Thanks for getting back. My bad. I meant SSH public keys. I want to > > make sure that the string which I'm receiving is a valid SSH public > > key. > > > > On Mon, Feb 28, 2022 at 6:13 PM Alex Gaynor wrote: > > > > > > What does it mean to you to validate an SSH key? > > > > > > pyOpenSSL does not have any functions for interacting with > > > SSH-formatted keys. cryptography has a function for parsing them: > > > https://cryptography.io/en/latest/hazmat/primitives/asymmetric/serialization/#openssh-public-key > > > > > > Alex > > > > > > On Mon, Feb 28, 2022 at 9:40 AM Seyed Mohammad Fakhraie > > > wrote: > > > > > > > > Greetings, > > > > I'm receiving encoded SSH keys from the user which I need to validate. > > > > Does pyopenssl have a function for validating SSH keys? > > > > _______________________________________________ > > > > Cryptography-dev mailing list > > > > Cryptography-dev at python.org > > > > https://mail.python.org/mailman/listinfo/cryptography-dev > > > > > > > > > > > > -- > > > All that is necessary for evil to succeed is for good people to do nothing. > > > _______________________________________________ > > > Cryptography-dev mailing list > > > Cryptography-dev at python.org > > > https://mail.python.org/mailman/listinfo/cryptography-dev > > _______________________________________________ > > Cryptography-dev mailing list > > Cryptography-dev at python.org > > https://mail.python.org/mailman/listinfo/cryptography-dev > > > > -- > All that is necessary for evil to succeed is for good people to do nothing. > _______________________________________________ > Cryptography-dev mailing list > Cryptography-dev at python.org > https://mail.python.org/mailman/listinfo/cryptography-dev