~rick-fdd/pyopenssl/rsa_check

« back to all changes in this revision

Viewing changes to src/crypto/netscape_spki.c

  • Committer: Jean-Paul Calderone
  • Date: 2009-07-16 18:09:53 UTC
  • mfrom: (112.2.8 rand_bytes2)
  • Revision ID: exarkun@divmod.com-20090716180953-nltnz5hhdv8k1zdw
Add OpenSSL.rand.bytes function

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        spki = NETSCAPE_SPKI_new();
58
58
    if (spki == NULL)
59
59
    {
60
 
        exception_from_error_queue();
 
60
        exception_from_error_queue(crypto_Error);
61
61
        return NULL;
62
62
    }
63
63
    return (PyObject *)crypto_NetscapeSPKI_New(spki, 1);
107
107
 
108
108
    if (!NETSCAPE_SPKI_sign(self->netscape_spki, pkey->pkey, digest))
109
109
    {
110
 
        exception_from_error_queue();
 
110
        exception_from_error_queue(crypto_Error);
111
111
        return NULL;
112
112
    }
113
113
 
133
133
 
134
134
    if ((answer = NETSCAPE_SPKI_verify(self->netscape_spki, pkey->pkey)) < 0)
135
135
    {
136
 
        exception_from_error_queue();
 
136
        exception_from_error_queue(crypto_Error);
137
137
        return NULL;
138
138
    }
139
139
 
176
176
 
177
177
    if ((pkey = NETSCAPE_SPKI_get_pubkey(self->netscape_spki)) == NULL)
178
178
    {
179
 
        exception_from_error_queue();
 
179
        exception_from_error_queue(crypto_Error);
180
180
        return NULL;
181
181
    }
182
182
 
200
200
 
201
201
    if (!NETSCAPE_SPKI_set_pubkey(self->netscape_spki, pkey->pkey))
202
202
    {
203
 
        exception_from_error_queue();
 
203
        exception_from_error_queue(crypto_Error);
204
204
        return NULL;
205
205
    }
206
206