summaryrefslogtreecommitdiffstats
path: root/src/plugins/preauth
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-06-10 18:17:37 +0000
committerGreg Hudson <ghudson@mit.edu>2011-06-10 18:17:37 +0000
commit16277050f158f062337d1d08258f9499dbc1cdc7 (patch)
tree713b2deadd3696c359e9b0051db9fa3de1d5a518 /src/plugins/preauth
parentcb8b1138d6e349a77507f3c561fc7ee2dde5cd7c (diff)
downloadkrb5-16277050f158f062337d1d08258f9499dbc1cdc7.tar.gz
krb5-16277050f158f062337d1d08258f9499dbc1cdc7.tar.xz
krb5-16277050f158f062337d1d08258f9499dbc1cdc7.zip
Mark up strings for translation
ticket: 6918 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24961 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/preauth')
-rw-r--r--src/plugins/preauth/pkinit/pkinit.h1
-rw-r--r--src/plugins/preauth/pkinit/pkinit_crypto_openssl.c16
-rw-r--r--src/plugins/preauth/pkinit/pkinit_identity.c7
-rw-r--r--src/plugins/preauth/pkinit/pkinit_srv.c18
4 files changed, 24 insertions, 18 deletions
diff --git a/src/plugins/preauth/pkinit/pkinit.h b/src/plugins/preauth/pkinit/pkinit.h
index 65984824e..b7246a99f 100644
--- a/src/plugins/preauth/pkinit/pkinit.h
+++ b/src/plugins/preauth/pkinit/pkinit.h
@@ -33,6 +33,7 @@
#include <krb5/krb5.h>
#include <krb5/preauth_plugin.h>
+#include <k5-platform.h>
#include <k5-int-pkinit.h>
#include <profile.h>
#include "pkinit_accessor.h"
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
index e5a3e34cc..51c0ee1d0 100644
--- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
@@ -856,8 +856,8 @@ cms_signeddata_create(krb5_context context,
ASN1_OBJECT *oid = NULL;
if (id_cryptoctx->my_certs == NULL) {
- krb5_set_error_message(context, EINVAL, "cms_signdata_create called "
- "with no certificates");
+ krb5_set_error_message(context, EINVAL, _("cms_signdata_create called "
+ "with no certificates"));
return EINVAL;
}
/* Start creating PKCS7 data. */
@@ -1211,9 +1211,9 @@ cms_signeddata_verify(krb5_context context,
octets = CMS_get0_content(cms);
if (!octets || ((*octets)->type != V_ASN1_OCTET_STRING)) {
retval = KRB5KDC_ERR_PREAUTH_FAILED;
- krb5_set_error_message(context, KRB5KDC_ERR_PREAUTH_FAILED,
- "Invalid pkinit packet: octet string "
- "expected");
+ krb5_set_error_message(context, retval,
+ _("Invalid pkinit packet: octet string "
+ "expected"));
goto cleanup;
}
*data_len = ASN1_STRING_length(*octets);
@@ -1231,7 +1231,7 @@ cms_signeddata_verify(krb5_context context,
if (OBJ_obj2nid(type) != NID_pkcs7_signed) {
pkiDebug("Expected id-signedData CMS msg (received type = %d)\n",
OBJ_obj2nid(type));
- krb5_set_error_message(context, retval, "wrong oid\n");
+ krb5_set_error_message(context, retval, _("wrong oid\n"));
goto cleanup;
}
}
@@ -3912,7 +3912,7 @@ pkinit_get_certs_pkcs12(krb5_context context,
int r = 0;
char prompt_string[128];
char prompt_reply[128];
- char prompt_prefix[] = "Pass phrase for";
+ char *prompt_prefix = _("Pass phrase for");
pkiDebug("Initial PKCS12_parse with no password failed\n");
@@ -5764,6 +5764,6 @@ pkinit_pkcs11_code_to_text(int err)
break;
if (pkcs11_errstrings[i].text != NULL)
return (pkcs11_errstrings[i].text);
- snprintf(uc, sizeof(uc), "unknown code 0x%x", err);
+ snprintf(uc, sizeof(uc), _("unknown code 0x%x"), err);
return (uc);
}
diff --git a/src/plugins/preauth/pkinit/pkinit_identity.c b/src/plugins/preauth/pkinit/pkinit_identity.c
index 2ba05a470..2527753f4 100644
--- a/src/plugins/preauth/pkinit/pkinit_identity.c
+++ b/src/plugins/preauth/pkinit/pkinit_identity.c
@@ -415,8 +415,8 @@ process_option_identity(krb5_context context,
pkiDebug("%s: Unsupported type while processing '%s'\n",
__FUNCTION__, value);
krb5_set_error_message(context, KRB5_PREAUTH_FAILED,
- "Unsupported type while processing '%s'\n",
- value);
+ _("Unsupported type while processing "
+ "'%s'\n"), value);
return KRB5_PREAUTH_FAILED;
}
} else {
@@ -449,7 +449,8 @@ process_option_identity(krb5_context context,
break;
default:
krb5_set_error_message(context, KRB5_PREAUTH_FAILED,
- "Internal error parsing X509_user_identity\n");
+ _("Internal error parsing "
+ "X509_user_identity\n"));
retval = EINVAL;
break;
}
diff --git a/src/plugins/preauth/pkinit/pkinit_srv.c b/src/plugins/preauth/pkinit/pkinit_srv.c
index 5a7a5adfe..2a33e9331 100644
--- a/src/plugins/preauth/pkinit/pkinit_srv.c
+++ b/src/plugins/preauth/pkinit/pkinit_srv.c
@@ -425,8 +425,9 @@ pkinit_server_verify_padata(krb5_context context,
if (!krb5_principal_compare(context, request->client,
krb5_anonymous_principal())) {
retval = KRB5KDC_ERR_PREAUTH_FAILED;
- krb5_set_error_message(context, retval, "Pkinit request not "
- "signed, but client not anonymous.");
+ krb5_set_error_message(context, retval,
+ _("Pkinit request not signed, but client "
+ "not anonymous."));
goto cleanup;
}
}
@@ -457,7 +458,9 @@ pkinit_server_verify_padata(krb5_context context,
} else if (!is_signed) {
/*Anonymous pkinit requires DH*/
retval = KRB5KDC_ERR_PREAUTH_FAILED;
- krb5_set_error_message(context, retval, "Anonymous pkinit without DH public value not supported.");
+ krb5_set_error_message(context, retval,
+ _("Anonymous pkinit without DH public "
+ "value not supported."));
goto cleanup;
}
/*
@@ -1087,7 +1090,7 @@ pkinit_init_kdc_profile(krb5_context context, pkinit_kdc_context plgctx)
if (retval != 0 || NULL == plgctx->idopts->identity) {
retval = EINVAL;
krb5_set_error_message(context, retval,
- "No pkinit_identity supplied for realm %s",
+ _("No pkinit_identity supplied for realm %s"),
plgctx->realmname);
goto errout;
}
@@ -1098,7 +1101,7 @@ pkinit_init_kdc_profile(krb5_context context, pkinit_kdc_context plgctx)
if (retval != 0 || NULL == plgctx->idopts->anchors) {
retval = EINVAL;
krb5_set_error_message(context, retval,
- "No pkinit_anchors supplied for realm %s",
+ _("No pkinit_anchors supplied for realm %s"),
plgctx->realmname);
goto errout;
}
@@ -1280,8 +1283,9 @@ pkinit_server_plugin_init(krb5_context context, void **blob,
if (j == 0) {
retval = EINVAL;
- krb5_set_error_message(context, retval, "No realms configured "
- "correctly for pkinit support");
+ krb5_set_error_message(context, retval,
+ _("No realms configured correctly for pkinit "
+ "support"));
goto errout;
}