~myers-1/pyopenssl/npn

« back to all changes in this revision

Viewing changes to OpenSSL/crypto/pkey.c

  • Committer: Jean-Paul Calderone
  • Date: 2011-11-01 14:17:25 UTC
  • mfrom: (161.1.2 pkey-check-segfault)
  • Revision ID: exarkun@divmod.com-20111101141725-ssk9etqrmteuqhy0
Fix PKey.check for public-only keys

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        return NULL;
125
125
    }
126
126
 
 
127
    if (self->only_public) {
 
128
        PyErr_SetString(PyExc_TypeError, "public key only");
 
129
        return NULL;
 
130
    }
 
131
 
127
132
    if (self->pkey->type == EVP_PKEY_RSA) {
128
133
        RSA *rsa;
129
134
        rsa = EVP_PKEY_get1_RSA(self->pkey);