aboutsummaryrefslogtreecommitdiff
path: root/ext/POW.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-05-10 04:04:46 +0000
committerRob Austein <sra@hactrn.net>2014-05-10 04:04:46 +0000
commitcb34da98906421cde8c391da337055efef1d3e0d (patch)
tree2f9d32232aa8345ba87108e4ae766a27cbe292e5 /ext/POW.c
parentf9572f97d8d0fa7eaa602a82135fc253cc8c4a64 (diff)
Proper idiom.
svn path=/trunk/; revision=5828
Diffstat (limited to 'ext/POW.c')
-rw-r--r--ext/POW.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/POW.c b/ext/POW.c
index 3a87de57..0f2383ae 100644
--- a/ext/POW.c
+++ b/ext/POW.c
@@ -1085,12 +1085,14 @@ ASN1_OBJECT_to_PyString(const ASN1_OBJECT *oid)
static void
whack_ec_key_to_namedCurve(EVP_PKEY *pkey)
{
+ EC_KEY *ec_key;
+
ENTERING(whack_ec_key_to_namedCurve);
- if (pkey != NULL && pkey->type == EVP_PKEY_EC && pkey->pkey.ptr != NULL) {
- EC_KEY *ec_key = EVP_PKEY_get0(pkey);
+ if (pkey != NULL &&
+ EVP_PKEY_id(pkey) == EVP_PKEY_EC &&
+ (ec_key = EVP_PKEY_get0(pkey)) != NULL)
EC_KEY_set_asn1_flag(ec_key, OPENSSL_EC_NAMED_CURVE);
- }
}
k */ .highlight .sc { color: #D20; background-color: #FFF0F0 } /* Literal.String.Char */ .highlight .dl { color: #D20; background-color: #FFF0F0 } /* Literal.String.Delimiter */ .highlight .sd { color: #D20; background-color: #FFF0F0 } /* Literal.String.Doc */ .highlight .s2 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Double */ .highlight .se { color: #04D; background-color: #FFF0F0 } /* Literal.String.Escape */ .highlight .sh { color: #D20; background-color: #FFF0F0 } /* Literal.String.Heredoc */ .highlight .si { color: #33B; background-color: #FFF0F0 } /* Literal.String.Interpol */ .highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
rem called by testpem

echo test %1 %2
%ssleay% %1 -in %2 -out %tmp1%
%cmp% %2 %tmp1%