diff options
author | 2014-04-18 01:59:00 +0000 | |
---|---|---|
committer | 2014-04-18 01:59:00 +0000 | |
commit | 7609e5c6e86d6ccb954247e2a2e1e2234db9e9b2 (patch) | |
tree | 5b74351a7bd53ec7ff9893218f16231452b0c53e /lib/libcrypto/x509/x509type.c | |
parent | Rework the command polling loop so it can handle multiple responses in a single (diff) | |
download | wireguard-openbsd-7609e5c6e86d6ccb954247e2a2e1e2234db9e9b2.tar.xz wireguard-openbsd-7609e5c6e86d6ccb954247e2a2e1e2234db9e9b2.zip |
blunt force knf
Diffstat (limited to 'lib/libcrypto/x509/x509type.c')
-rw-r--r-- | lib/libcrypto/x509/x509type.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/libcrypto/x509/x509type.c b/lib/libcrypto/x509/x509type.c index 9702ec53103..ff06cfcab99 100644 --- a/lib/libcrypto/x509/x509type.c +++ b/lib/libcrypto/x509/x509type.c @@ -63,7 +63,7 @@ #include <openssl/x509.h> int X509_certificate_type(X509 *x, EVP_PKEY *pkey) - { +{ EVP_PKEY *pk; int ret=0,i; @@ -76,8 +76,7 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) if (pk == NULL) return(0); - switch (pk->type) - { + switch (pk->type) { case EVP_PKEY_RSA: ret=EVP_PK_RSA|EVP_PKT_SIGN; /* if (!sign only extension) */ @@ -98,14 +97,12 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) break; default: break; - } + } i=OBJ_obj2nid(x->sig_alg->algorithm); - if (i && OBJ_find_sigid_algs(i, NULL, &i)) - { + if (i && OBJ_find_sigid_algs(i, NULL, &i)) { - switch (i) - { + switch (i) { case NID_rsaEncryption: case NID_rsa: ret|=EVP_PKS_RSA; @@ -119,13 +116,13 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) break; default: break; - } } + } if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look for, not bytes */ ret|=EVP_PKT_EXP; if(pkey==NULL) EVP_PKEY_free(pk); return(ret); - } +} |