aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/x509_key.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-03-28 23:35:36 +0000
committerlloyd <[email protected]>2012-03-28 23:35:36 +0000
commit9594979caf775dc4062850044715b804d1fda60c (patch)
tree0eb8470483a12e64cca065d5e8bfad3cd28dfeef /src/pubkey/x509_key.cpp
parent0da08c29d55ddea710767267af3ec690e91a77a6 (diff)
Kill off the quite vestigal pubkey_enums header. Move most of the code
to key_constraints.{h,cpp} in cert/x509. Move the X509_Encoding enum to x509_key.h Constify argument to X509_Object::check_signature, accidental ommision
Diffstat (limited to 'src/pubkey/x509_key.cpp')
-rw-r--r--src/pubkey/x509_key.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/pubkey/x509_key.cpp b/src/pubkey/x509_key.cpp
index 4714b1285..c55f37d94 100644
--- a/src/pubkey/x509_key.cpp
+++ b/src/pubkey/x509_key.cpp
@@ -107,32 +107,6 @@ Public_Key* copy_key(const Public_Key& key)
return X509::load_key(source);
}
-/*
-* Find the allowable key constraints
-*/
-Key_Constraints find_constraints(const Public_Key& pub_key,
- Key_Constraints limits)
- {
- const std::string name = pub_key.algo_name();
-
- size_t constraints = 0;
-
- if(name == "DH" || name == "ECDH")
- constraints |= KEY_AGREEMENT;
-
- if(name == "RSA" || name == "ElGamal")
- constraints |= KEY_ENCIPHERMENT | DATA_ENCIPHERMENT;
-
- if(name == "RSA" || name == "RW" || name == "NR" ||
- name == "DSA" || name == "ECDSA")
- constraints |= DIGITAL_SIGNATURE | NON_REPUDIATION;
-
- if(limits)
- constraints &= limits;
-
- return Key_Constraints(constraints);
- }
-
}
}