summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_trs.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-05-10 00:13:59 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-05-10 00:13:59 +0000
commit926a56bfe380e82ebd07c79ccc7d1d9524c0aca6 (patch)
treeaaace3ffe1d3428f573a40fe13f22f9fbee60cb7 /crypto/x509/x509_trs.c
parentd6f188be71425a1c5441999734feaf73c6a7c8c9 (diff)
Purpose and trust setting functions for X509_STORE.
Tidy existing code.
Diffstat (limited to 'crypto/x509/x509_trs.c')
-rw-r--r--crypto/x509/x509_trs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c
index 4f48b55160..c164badbe4 100644
--- a/crypto/x509/x509_trs.c
+++ b/crypto/x509/x509_trs.c
@@ -144,6 +144,16 @@ int X509_TRUST_get_by_id(int id)
return idx + X509_TRUST_COUNT;
}
+int X509_TRUST_set(int *t, int trust)
+{
+ if(X509_TRUST_get_by_id(trust) == -1) {
+ X509err(X509_F_X509_TRUST_SET, X509_R_INVALID_TRUST);
+ return 0;
+ }
+ *t = trust;
+ return 1;
+}
+
int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
char *name, int arg1, void *arg2)
{