aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/x509_cert_parser.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <d.kasatkin@samsung.com>2013-05-06 08:58:15 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2013-10-25 17:15:18 -0400
commit3fe78ca2fb1d61ea598e63fcbf38aec76b36b3a8 (patch)
treed980cc80515b6ee7609de1e61583fa91cedaae83 /crypto/asymmetric_keys/x509_cert_parser.c
parentee08997fee16f10be23c9748d609dbdf3baab8e4 (diff)
keys: change asymmetric keys to use common hash definitions
This patch makes use of the newly defined common hash algorithm info, replacing, for example, PKEY_HASH with HASH_ALGO. Changelog: - Lindent fixes - Mimi CC: David Howells <dhowells@redhat.com> Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'crypto/asymmetric_keys/x509_cert_parser.c')
-rw-r--r--crypto/asymmetric_keys/x509_cert_parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c
index 144201ccba0c..29893162497c 100644
--- a/crypto/asymmetric_keys/x509_cert_parser.c
+++ b/crypto/asymmetric_keys/x509_cert_parser.c
@@ -154,32 +154,32 @@ int x509_note_pkey_algo(void *context, size_t hdrlen,
154 return -ENOPKG; /* Unsupported combination */ 154 return -ENOPKG; /* Unsupported combination */
155 155
156 case OID_md4WithRSAEncryption: 156 case OID_md4WithRSAEncryption:
157 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_MD5; 157 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_MD5;
158 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 158 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
159 break; 159 break;
160 160
161 case OID_sha1WithRSAEncryption: 161 case OID_sha1WithRSAEncryption:
162 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_SHA1; 162 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_SHA1;
163 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 163 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
164 break; 164 break;
165 165
166 case OID_sha256WithRSAEncryption: 166 case OID_sha256WithRSAEncryption:
167 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_SHA256; 167 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_SHA256;
168 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 168 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
169 break; 169 break;
170 170
171 case OID_sha384WithRSAEncryption: 171 case OID_sha384WithRSAEncryption:
172 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_SHA384; 172 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_SHA384;
173 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 173 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
174 break; 174 break;
175 175
176 case OID_sha512WithRSAEncryption: 176 case OID_sha512WithRSAEncryption:
177 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_SHA512; 177 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_SHA512;
178 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 178 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
179 break; 179 break;
180 180
181 case OID_sha224WithRSAEncryption: 181 case OID_sha224WithRSAEncryption:
182 ctx->cert->sig.pkey_hash_algo = PKEY_HASH_SHA224; 182 ctx->cert->sig.pkey_hash_algo = HASH_ALGO_SHA224;
183 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA; 183 ctx->cert->sig.pkey_algo = PKEY_ALGO_RSA;
184 break; 184 break;
185 } 185 }